RGB to HEX
Convert RGB color values to HEX color codes.
Convert an RGB colour to its HEX code: rgb(255, 87, 51) becomes #FF5733. Type values as rgb(…), as three numbers separated by spaces or commas, or several colours one per line, and each one is converted with a swatch so you can check it. RGBA colours with transparency become 8-digit HEX. Below the result you also get the same colour in HSL, HSV, CMYK and the nearest CSS colour name.
HEX
#FF5733
| HEX | #FF5733 | |
|---|---|---|
| RGB | rgb(255, 87, 51) | |
| HSL | hsl(11, 100%, 60%) | |
| HSV / HSB | hsv(11, 80%, 100%) | |
| CMYK | cmyk(0%, 66%, 80%, 0%) | |
| CSS name | tomato (closest) |
Common use cases
- Get a HEX code for CSS from RGB values in a design tool
- Convert brand colours given in RGB for a website
- Batch-convert a palette, one colour per line
- Check a colour's HSL or CMYK values at the same time
How to use
- Type an RGB colour, or several on separate lines.
- Read the HEX code next to each swatch.
- Copy the code, or use the other formats in the table.
FAQ
How is RGB converted to HEX?
Each channel (0 to 255) is written as a two-digit hexadecimal number: 255 is FF, 87 is 57 and 51 is 33, giving #FF5733.
What about transparency?
An alpha value (rgba) adds two more hex digits, so 50% opacity becomes 80 on the end: #FF573380.
Why is the CMYK value only approximate?
Printed colour depends on ink and paper. The CMYK figure here is a simple conversion; for print work, use your printer's colour profile.
Related tools
- HEX to RGBConvert HEX color codes to RGB values.
- RGB to HSLConvert RGB color values to HSL format.
- Color PickerPick colors visually and get HEX, RGB, and HSL values.
- Color Wheel: Find Matching ShadesFree online color wheel: pick a shade and see its complementary, analogous, triadic and other schemes, on a…
- HSL to RGBConvert HSL color values to RGB format.
- Color Palette GeneratorIn Generators
- Random Color GeneratorIn Generators
- HEX Color ListIn Reference