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.
#ff6347#FF6347rgb(255, 99, 71)rgb(255 99 71)hsl(9, 100%, 64%)hsv(9, 72%, 100%)cmyk(0%, 61%, 72%, 0%)oklch(69.62% 0.1955 32.32)1.000, 0.388, 0.278🔒 Converted instantly in your browser. Need more control? Open the full color picker.
How to convert HEX to RGB
- Paste a hex code like
#4f46e5,4f46e5or the short form#f00. - Read the result:
rgb(79, 70, 229). Copy it, or adjust the channels with the sliders. - 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.
| Color | HEX | RGB |
|---|---|---|
| #f0f8ff | rgb(240, 248, 255) | |
| #faebd7 | rgb(250, 235, 215) | |
| #00ffff | rgb(0, 255, 255) | |
| #7fffd4 | rgb(127, 255, 212) | |
| #f0ffff | rgb(240, 255, 255) | |
| #f5f5dc | rgb(245, 245, 220) | |
| #ffe4c4 | rgb(255, 228, 196) | |
| #000000 | rgb(0, 0, 0) | |
| #ffebcd | rgb(255, 235, 205) | |
| #0000ff | rgb(0, 0, 255) | |
| #8a2be2 | rgb(138, 43, 226) | |
| #a52a2a | rgb(165, 42, 42) | |
| #deb887 | rgb(222, 184, 135) | |
| #5f9ea0 | rgb(95, 158, 160) | |
| #7fff00 | rgb(127, 255, 0) | |
| #d2691e | rgb(210, 105, 30) | |
| #ff7f50 | rgb(255, 127, 80) | |
| #6495ed | rgb(100, 149, 237) | |
| #fff8dc | rgb(255, 248, 220) | |
| #dc143c | rgb(220, 20, 60) | |
| #00ffff | rgb(0, 255, 255) | |
| #00008b | rgb(0, 0, 139) | |
| #008b8b | rgb(0, 139, 139) | |
| #b8860b | rgb(184, 134, 11) | |
| #a9a9a9 | rgb(169, 169, 169) | |
| #006400 | rgb(0, 100, 0) | |
| #a9a9a9 | rgb(169, 169, 169) | |
| #bdb76b | rgb(189, 183, 107) | |
| #8b008b | rgb(139, 0, 139) | |
| #556b2f | rgb(85, 107, 47) | |
| #ff8c00 | rgb(255, 140, 0) | |
| #9932cc | rgb(153, 50, 204) | |
| #8b0000 | rgb(139, 0, 0) | |
| #e9967a | rgb(233, 150, 122) | |
| #8fbc8f | rgb(143, 188, 143) | |
| #483d8b | rgb(72, 61, 139) | |
| #2f4f4f | rgb(47, 79, 79) | |
| #2f4f4f | rgb(47, 79, 79) | |
| #00ced1 | rgb(0, 206, 209) | |
| #9400d3 | rgb(148, 0, 211) | |
| #ff1493 | rgb(255, 20, 147) | |
| #00bfff | rgb(0, 191, 255) | |
| #696969 | rgb(105, 105, 105) | |
| #696969 | rgb(105, 105, 105) | |
| #1e90ff | rgb(30, 144, 255) | |
| #b22222 | rgb(178, 34, 34) | |
| #fffaf0 | rgb(255, 250, 240) | |
| #228b22 | rgb(34, 139, 34) | |
| #ff00ff | rgb(255, 0, 255) | |
| #dcdcdc | rgb(220, 220, 220) | |
| #f8f8ff | rgb(248, 248, 255) | |
| #ffd700 | rgb(255, 215, 0) | |
| #daa520 | rgb(218, 165, 32) | |
| #808080 | rgb(128, 128, 128) | |
| #008000 | rgb(0, 128, 0) | |
| #adff2f | rgb(173, 255, 47) | |
| #808080 | rgb(128, 128, 128) | |
| #f0fff0 | rgb(240, 255, 240) | |
| #ff69b4 | rgb(255, 105, 180) | |
| #cd5c5c | rgb(205, 92, 92) | |
| #4b0082 | rgb(75, 0, 130) | |
| #fffff0 | rgb(255, 255, 240) | |
| #f0e68c | rgb(240, 230, 140) | |
| #e6e6fa | rgb(230, 230, 250) | |
| #fff0f5 | rgb(255, 240, 245) | |
| #7cfc00 | rgb(124, 252, 0) | |
| #fffacd | rgb(255, 250, 205) | |
| #add8e6 | rgb(173, 216, 230) | |
| #f08080 | rgb(240, 128, 128) | |
| #e0ffff | rgb(224, 255, 255) | |
| #fafad2 | rgb(250, 250, 210) | |
| #d3d3d3 | rgb(211, 211, 211) | |
| #90ee90 | rgb(144, 238, 144) | |
| #d3d3d3 | rgb(211, 211, 211) | |
| #ffb6c1 | rgb(255, 182, 193) | |
| #ffa07a | rgb(255, 160, 122) | |
| #20b2aa | rgb(32, 178, 170) | |
| #87cefa | rgb(135, 206, 250) | |
| #778899 | rgb(119, 136, 153) | |
| #778899 | rgb(119, 136, 153) | |
| #b0c4de | rgb(176, 196, 222) | |
| #ffffe0 | rgb(255, 255, 224) | |
| #00ff00 | rgb(0, 255, 0) | |
| #32cd32 | rgb(50, 205, 50) | |
| #faf0e6 | rgb(250, 240, 230) | |
| #ff00ff | rgb(255, 0, 255) | |
| #800000 | rgb(128, 0, 0) | |
| #66cdaa | rgb(102, 205, 170) | |
| #0000cd | rgb(0, 0, 205) | |
| #ba55d3 | rgb(186, 85, 211) | |
| #9370db | rgb(147, 112, 219) | |
| #3cb371 | rgb(60, 179, 113) | |
| #7b68ee | rgb(123, 104, 238) | |
| #00fa9a | rgb(0, 250, 154) | |
| #48d1cc | rgb(72, 209, 204) | |
| #c71585 | rgb(199, 21, 133) | |
| #191970 | rgb(25, 25, 112) | |
| #f5fffa | rgb(245, 255, 250) | |
| #ffe4e1 | rgb(255, 228, 225) | |
| #ffe4b5 | rgb(255, 228, 181) | |
| #ffdead | rgb(255, 222, 173) | |
| #000080 | rgb(0, 0, 128) | |
| #fdf5e6 | rgb(253, 245, 230) | |
| #808000 | rgb(128, 128, 0) | |
| #6b8e23 | rgb(107, 142, 35) | |
| #ffa500 | rgb(255, 165, 0) | |
| #ff4500 | rgb(255, 69, 0) | |
| #da70d6 | rgb(218, 112, 214) | |
| #eee8aa | rgb(238, 232, 170) | |
| #98fb98 | rgb(152, 251, 152) | |
| #afeeee | rgb(175, 238, 238) | |
| #db7093 | rgb(219, 112, 147) | |
| #ffefd5 | rgb(255, 239, 213) | |
| #ffdab9 | rgb(255, 218, 185) | |
| #cd853f | rgb(205, 133, 63) | |
| #ffc0cb | rgb(255, 192, 203) | |
| #dda0dd | rgb(221, 160, 221) | |
| #b0e0e6 | rgb(176, 224, 230) | |
| #800080 | rgb(128, 0, 128) | |
| #663399 | rgb(102, 51, 153) | |
| #ff0000 | rgb(255, 0, 0) | |
| #bc8f8f | rgb(188, 143, 143) | |
| #4169e1 | rgb(65, 105, 225) | |
| #8b4513 | rgb(139, 69, 19) | |
| #fa8072 | rgb(250, 128, 114) | |
| #f4a460 | rgb(244, 164, 96) | |
| #2e8b57 | rgb(46, 139, 87) | |
| #fff5ee | rgb(255, 245, 238) | |
| #a0522d | rgb(160, 82, 45) | |
| #c0c0c0 | rgb(192, 192, 192) | |
| #87ceeb | rgb(135, 206, 235) | |
| #6a5acd | rgb(106, 90, 205) | |
| #708090 | rgb(112, 128, 144) | |
| #708090 | rgb(112, 128, 144) | |
| #fffafa | rgb(255, 250, 250) | |
| #00ff7f | rgb(0, 255, 127) | |
| #4682b4 | rgb(70, 130, 180) | |
| #d2b48c | rgb(210, 180, 140) | |
| #008080 | rgb(0, 128, 128) | |
| #d8bfd8 | rgb(216, 191, 216) | |
| #ff6347 | rgb(255, 99, 71) | |
| #40e0d0 | rgb(64, 224, 208) | |
| #ee82ee | rgb(238, 130, 238) | |
| #f5deb3 | rgb(245, 222, 179) | |
| #ffffff | rgb(255, 255, 255) | |
| #f5f5f5 | rgb(245, 245, 245) | |
| #ffff00 | rgb(255, 255, 0) | |
| #9acd32 | rgb(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