Type or pick a color and get its HEX, RGB, HSL and CMYK values at once. Edit any field and the others update.
A HEX color such as #267FD9 is three pairs of hexadecimal digits: red, green and blue. Convert each pair to a decimal number from 0 to 255:
26 = 2×16 + 6 = 38 · 7F = 7×16 + 15 = 127 · D9 = 13×16 + 9 = 217To go from RGB to HEX, convert each number to two hex digits (38 → 26, 127 → 7F, 217 → D9) and join them. The converter above does both directions, and it also accepts three-digit shorthand: #26D is the same as #2266DD.
| Format | Example (same color) | Best for |
|---|---|---|
| HEX | #267FD9 | CSS, design tools, short and easy to copy |
| RGB | rgb(38, 127, 217) | Screens, code that blends or animates channels |
| HSL | hsl(210, 70%, 50%) | Making lighter or darker shades by changing lightness |
| CMYK | cmyk(82%, 41%, 0%, 15%) | Print, approximate only |
CMYK values here use the standard mathematical conversion from RGB. Real print colors depend on the printer, paper and color profile, so use the result as a starting point and check a proof before printing.
Want palettes from your color? Read the guide to monochromatic and complementary colors or generate one in the color palette generator.
Split the HEX code into three pairs and convert each from hexadecimal to decimal. #FF8000 is FF=255, 80=128, 00=0, so rgb(255, 128, 0).
rgb(255, 255, 255), which is white. #000000 is rgb(0, 0, 0), which is black.
Yes. A three-digit code is expanded by doubling each digit, so #F80 becomes #FF8800.
CMYK depends on the printer and paper. The tool uses the standard formula from RGB, so real print results can look different.
No. All conversion runs in your browser.