MockFoxAdvertise

HEX to RGB Converter

Updated Free mock REST & WebSocket APIs

Type or paste a hex code to get its RGB value. It works both ways — drag the R, G and B sliders and the hex updates too.

RGBrgb(255, 99, 71)CSS name: tomato
HEX

Accepts #RGB, #RRGGBB, 8-digit #RRGGBBAA, with or without the # — or paste any CSS color.

⇄
RGB
Every format
HEX#ff6347
HEX (uppercase)#FF6347
RGBrgb(255, 99, 71)
CSS rgb() modernrgb(255 99 71)
HSLhsl(9, 100%, 64%)
HSV / HSBhsv(9, 72%, 100%)
CMYKcmyk(0%, 61%, 72%, 0%)
OKLCHoklch(69.62% 0.1955 32.32)
Decimal 0–11.000, 0.388, 0.278

🔒 Converted instantly in your browser. Need more control? Open the full color picker.

How to convert HEX to RGB

  1. Paste a hex code like #4f46e5, 4f46e5 or the short form #f00.
  2. Read the result: rgb(79, 70, 229). Copy it, or adjust the channels with the sliders.
  3. Need another format? HSL, HSV, CMYK, OKLCH and 0–1 decimals are listed underneath.

The formula

A hex color is three pairs of base-16 digits — red, green and blue — each from 00 (0) to ff (255). Convert each pair separately: multiply the first digit by 16 and add the second, where a–f stand for 10–15.

Example: #4f46e5 → red 4f = 4×16 + 15 = 79, green 46 = 4×16 + 6 = 70, blue e5 = 14×16 + 5 = 229, so the result is rgb(79, 70, 229).

  • 3-digit hex doubles each digit: #f80 = #ff8800 = rgb(255, 136, 0).
  • 8-digit hex adds alpha as a fourth pair: #0000ff80 = rgba(0, 0, 255, 0.5) (80 hex = 128 ÷ 255 ≈ 0.5).
  • In JavaScript: const [r, g, b] = hex.match(/\w\w/g).map(x => parseInt(x, 16)).

CSS named colors

All 148 color keywords from the CSS Color specification. Click a name to load it into the converter.

ColorHEXRGB
#f0f8ffrgb(240, 248, 255)
#faebd7rgb(250, 235, 215)
#00ffffrgb(0, 255, 255)
#7fffd4rgb(127, 255, 212)
#f0ffffrgb(240, 255, 255)
#f5f5dcrgb(245, 245, 220)
#ffe4c4rgb(255, 228, 196)
#000000rgb(0, 0, 0)
#ffebcdrgb(255, 235, 205)
#0000ffrgb(0, 0, 255)
#8a2be2rgb(138, 43, 226)
#a52a2argb(165, 42, 42)
#deb887rgb(222, 184, 135)
#5f9ea0rgb(95, 158, 160)
#7fff00rgb(127, 255, 0)
#d2691ergb(210, 105, 30)
#ff7f50rgb(255, 127, 80)
#6495edrgb(100, 149, 237)
#fff8dcrgb(255, 248, 220)
#dc143crgb(220, 20, 60)
#00ffffrgb(0, 255, 255)
#00008brgb(0, 0, 139)
#008b8brgb(0, 139, 139)
#b8860brgb(184, 134, 11)
#a9a9a9rgb(169, 169, 169)
#006400rgb(0, 100, 0)
#a9a9a9rgb(169, 169, 169)
#bdb76brgb(189, 183, 107)
#8b008brgb(139, 0, 139)
#556b2frgb(85, 107, 47)
#ff8c00rgb(255, 140, 0)
#9932ccrgb(153, 50, 204)
#8b0000rgb(139, 0, 0)
#e9967argb(233, 150, 122)
#8fbc8frgb(143, 188, 143)
#483d8brgb(72, 61, 139)
#2f4f4frgb(47, 79, 79)
#2f4f4frgb(47, 79, 79)
#00ced1rgb(0, 206, 209)
#9400d3rgb(148, 0, 211)
#ff1493rgb(255, 20, 147)
#00bfffrgb(0, 191, 255)
#696969rgb(105, 105, 105)
#696969rgb(105, 105, 105)
#1e90ffrgb(30, 144, 255)
#b22222rgb(178, 34, 34)
#fffaf0rgb(255, 250, 240)
#228b22rgb(34, 139, 34)
#ff00ffrgb(255, 0, 255)
#dcdcdcrgb(220, 220, 220)
#f8f8ffrgb(248, 248, 255)
#ffd700rgb(255, 215, 0)
#daa520rgb(218, 165, 32)
#808080rgb(128, 128, 128)
#008000rgb(0, 128, 0)
#adff2frgb(173, 255, 47)
#808080rgb(128, 128, 128)
#f0fff0rgb(240, 255, 240)
#ff69b4rgb(255, 105, 180)
#cd5c5crgb(205, 92, 92)
#4b0082rgb(75, 0, 130)
#fffff0rgb(255, 255, 240)
#f0e68crgb(240, 230, 140)
#e6e6fargb(230, 230, 250)
#fff0f5rgb(255, 240, 245)
#7cfc00rgb(124, 252, 0)
#fffacdrgb(255, 250, 205)
#add8e6rgb(173, 216, 230)
#f08080rgb(240, 128, 128)
#e0ffffrgb(224, 255, 255)
#fafad2rgb(250, 250, 210)
#d3d3d3rgb(211, 211, 211)
#90ee90rgb(144, 238, 144)
#d3d3d3rgb(211, 211, 211)
#ffb6c1rgb(255, 182, 193)
#ffa07argb(255, 160, 122)
#20b2aargb(32, 178, 170)
#87cefargb(135, 206, 250)
#778899rgb(119, 136, 153)
#778899rgb(119, 136, 153)
#b0c4dergb(176, 196, 222)
#ffffe0rgb(255, 255, 224)
#00ff00rgb(0, 255, 0)
#32cd32rgb(50, 205, 50)
#faf0e6rgb(250, 240, 230)
#ff00ffrgb(255, 0, 255)
#800000rgb(128, 0, 0)
#66cdaargb(102, 205, 170)
#0000cdrgb(0, 0, 205)
#ba55d3rgb(186, 85, 211)
#9370dbrgb(147, 112, 219)
#3cb371rgb(60, 179, 113)
#7b68eergb(123, 104, 238)
#00fa9argb(0, 250, 154)
#48d1ccrgb(72, 209, 204)
#c71585rgb(199, 21, 133)
#191970rgb(25, 25, 112)
#f5fffargb(245, 255, 250)
#ffe4e1rgb(255, 228, 225)
#ffe4b5rgb(255, 228, 181)
#ffdeadrgb(255, 222, 173)
#000080rgb(0, 0, 128)
#fdf5e6rgb(253, 245, 230)
#808000rgb(128, 128, 0)
#6b8e23rgb(107, 142, 35)
#ffa500rgb(255, 165, 0)
#ff4500rgb(255, 69, 0)
#da70d6rgb(218, 112, 214)
#eee8aargb(238, 232, 170)
#98fb98rgb(152, 251, 152)
#afeeeergb(175, 238, 238)
#db7093rgb(219, 112, 147)
#ffefd5rgb(255, 239, 213)
#ffdab9rgb(255, 218, 185)
#cd853frgb(205, 133, 63)
#ffc0cbrgb(255, 192, 203)
#dda0ddrgb(221, 160, 221)
#b0e0e6rgb(176, 224, 230)
#800080rgb(128, 0, 128)
#663399rgb(102, 51, 153)
#ff0000rgb(255, 0, 0)
#bc8f8frgb(188, 143, 143)
#4169e1rgb(65, 105, 225)
#8b4513rgb(139, 69, 19)
#fa8072rgb(250, 128, 114)
#f4a460rgb(244, 164, 96)
#2e8b57rgb(46, 139, 87)
#fff5eergb(255, 245, 238)
#a0522drgb(160, 82, 45)
#c0c0c0rgb(192, 192, 192)
#87ceebrgb(135, 206, 235)
#6a5acdrgb(106, 90, 205)
#708090rgb(112, 128, 144)
#708090rgb(112, 128, 144)
#fffafargb(255, 250, 250)
#00ff7frgb(0, 255, 127)
#4682b4rgb(70, 130, 180)
#d2b48crgb(210, 180, 140)
#008080rgb(0, 128, 128)
#d8bfd8rgb(216, 191, 216)
#ff6347rgb(255, 99, 71)
#40e0d0rgb(64, 224, 208)
#ee82eergb(238, 130, 238)
#f5deb3rgb(245, 222, 179)
#ffffffrgb(255, 255, 255)
#f5f5f5rgb(245, 245, 245)
#ffff00rgb(255, 255, 0)
#9acd32rgb(154, 205, 50)

Related tools

Embed this tool on your site

Browse all embeddable tools →

Free for blogs, HR, payroll and contractor sites: copy one snippet — the widget sizes itself and matches your colors.

Get the embed code

Frequently asked questions

Is it free and private?

Yes. It's free with no sign-up, and it runs entirely in your browser — the colors you enter are never uploaded or logged.

Is hex the same as RGB?

Yes — they describe the same sRGB color. Hex writes each 0–255 channel as two base-16 digits; rgb() writes them as decimal numbers.

How do I convert hex with transparency?

Use 8 digits: the last pair is alpha from 00 (transparent) to ff (opaque). #ff000080 is rgba(255, 0, 0, 0.5).

Is hex case-sensitive?

No. #FF6347 and #ff6347 are the same color; lowercase is the most common style in CSS.

Your business here? Sponsor this tool from $16/week. See placements