RGB to HEX converter
Type red, green, and blue, or paste rgb(), and copy the HEX code.
HEX
RGB
HSL
How it works
rgb(66, 133, 244)
66 ÷ 16 = 4 remainder 2 → 42
133 ÷ 16 = 8 remainder 5 → 85
244 ÷ 16 = 15 remainder 4 → F4
= #4285F4RGB to HEX chart
| Color | RGB | HEX |
|---|---|---|
| Black | ||
| White | ||
| Red | ||
| Lime | ||
| Blue | ||
| Yellow | ||
| Cyan | ||
| Magenta | ||
| Silver | ||
| Gray | ||
| Maroon | ||
| Olive | ||
| Green | ||
| Purple | ||
| Teal | ||
| Navy | ||
| Orange | ||
| Pink |
Questions
How do I convert RGB to HEX?
Write red, green, and blue in base 16, two digits each, after a #. rgb(66, 133, 244) is 42, 85, and F4: #4285F4.
How do I convert RGBA to HEX?
Add the alpha as a fourth pair: multiply it by 255 and write it in base 16. rgba(66, 133, 244, 0.5) is #4285F480.
Are HEX codes case sensitive?
No. #4285F4 and #4285f4 are the same color.
Can I paste an rgb() value?
Yes. Paste rgb(255, 87, 51) or rgba(255, 87, 51, 0.5) into any field and it fills them all.