Color Converter
Convert a colour between HEX, RGB, HSL and CMYK, with the equivalent values shown in every format at once.
What the Color Converter does
The same colour has several representations. RGB describes it as additive light, HSL as hue with saturation and lightness, and CMYK as subtractive ink. Converting between them is exact for RGB and HSL, but CMYK depends on the output device.
Formula
HEX to RGB: each pair of hex digits is one channel, 0–255L = (max + min) ÷ 2S = (max − min) ÷ (1 − |2L − 1|)K = 1 − max(R, G, B); C = (1 − R − K) ÷ (1 − K)
Inputs explained
| Input | Unit | Required | Notes |
|---|---|---|---|
| Input format | one of 3 options | Yes | — |
| HEX colour | text | In some modes | Shown Input format is HEX. |
| Red | number | In some modes | Accepts 0 or more, up to 255. Shown Input format is RGB. |
| Green | number | In some modes | Accepts 0 or more, up to 255. Shown Input format is RGB. |
| Blue | number | In some modes | Accepts 0 or more, up to 255. Shown Input format is RGB. |
| Hue | ° | In some modes | Accepts 0 or more, up to 360. Shown Input format is HSL. |
| Saturation | % | In some modes | Shown Input format is HSL. |
| Lightness | % | In some modes | Shown Input format is HSL. |
How to use it
- Choose Input format.
- Fill in the remaining inputs the form shows for your choice.
- Select Calculate.
Worked example
Converting the hex colour #3B82F6.
- HEX
- #3B82F6
rgb(59, 130, 246), which is hsl(217, 91.2%, 59.8%) and CMYK 76%, 47.2%, 0%, 3.5%.
Frequently asked questions
Why does the same colour look different in print?
Screens emit light additively in RGB; print absorbs it subtractively in CMYK. Many vivid RGB colours simply cannot be reproduced with ink, so they shift on conversion.
What is the three-digit hex shorthand?
#38F expands to #3388FF — each digit is doubled. It only reaches 4,096 colours instead of 16.7 million.