Three different kinds of thing
Before the individual notations, the distinction that organises all of this:
- Re-writings. HEX and RGB. Identical information, different base. Converting between them changes nothing at all.
- Coordinate changes. HSL and HSV. The same point in the same space, addressed by angle and distance rather than by three axes. Fully reversible; the only loss is rounding.
- Device conversions. CMYK. A translation into what a particular printer can physically do with a particular set of inks on a particular paper. Not reversible, not unique, and not defined at all without extra information.
Almost every colour surprise anyone has ever had comes from treating the third category like the first two.
HEX
#D9481F · #FFF · #D9481F80Six hexadecimal digits, read in pairs: red, green, blue. Each pair is a byte — two base-16 digits covering 00 to FF, which is 0 to 255 in decimal. Three channels of 256 values gives 256³ = 16,777,216 distinct combinations, the famous “16.7 million colours”.
The three-digit shorthand #FFF simply doubles each digit — it is exactly #FFFFFF, not an approximation of it. An eight-digit form appends a fourth pair for alpha (opacity), which is not colour information at all but a compositing instruction.
holds: three 8-bit numbers. nothing else.
RGB
rgb(217, 72, 31)The same three bytes in base 10. D9 is 217, 48 is 72, 1F is 31. HEX and RGB are the same value wearing different clothes, which is why a converter between them can never be wrong.
Here is the part that gets skipped: a triple of numbers is not a colour. It is an instruction — “drive the red primary to 85% of its maximum” — and it means nothing until you say whose red primary. That is what a colour space supplies. On the web the assumption is sRGB (defined in IEC 61966-2-1), and everything works because everyone assumes the same thing. Feed the identical numbers to a wide-gamut space such as Display P3 and you get a visibly different, more saturated colour from the same digits.
holds: three 8-bit numbers + an assumed colour space you cannot see in the notation.
HSL / HSV
hsl(15, 75%, 49%)Hue as an angle on a colour wheel (0–360°), then saturation and either lightness or value as percentages. No new colours exist here — it is the same RGB cube addressed cylindrically. The transform is pure arithmetic and runs in both directions.
Its value is that the axes match how people talk. “Same colour, a bit lighter” is one number in HSL and three coupled numbers in RGB, which is why tints, shades and harmonies (complementary at +180°, triadic at ±120°) are trivially generated in HSL and awkward in HEX.
One caution worth knowing: HSL's lightness is a geometric coordinate, not a perceptual one. Two colours at L = 50% can look wildly different in brightness — a pure yellow and a pure blue are the standard demonstration. If you need equal perceived lightness, HSL will not give it to you.
holds: exactly what RGB holds, re-parameterised.
CMYK
0 / 67 / 86 / 15 — but see belowCyan, magenta, yellow and key (black), expressed as ink coverage percentages. This is a subtractive system: you start with white paper reflecting everything and each ink removes part of the spectrum. RGB is additive — you start with black and add light. They are opposite processes, not opposite ends of one scale.
The K exists for practical reasons rather than theoretical ones. Overprinting cyan, magenta and yellow to make black wastes ink, soaks the paper, and produces a muddy brown-black anyway; a dedicated black plate is cheaper, drier and sharper, and carries the text.
Critically, a CMYK number describes ink on a press, and presses differ. The same four percentages on coated stock and on uncoated stock are two different colours. This is why a CMYK value quoted with no further context is incomplete in a way an RGB value never is.
holds: four ink percentages, meaningless without a press, a paper and a profile.
The conversion map
Sorted by what actually happens to your colour on the way through:
A base change. Round-trip a million times and the value is bit-identical. There is exactly one right answer and every tool gives it.
Mathematically reversible. The only loss comes from displaying hue as a whole degree and saturation as a whole percent — round-trip repeatedly through rounded values and a channel can drift by one or two. Keep the HEX as the source of truth and this never matters.
Several defensible formulas exist. The perceptually weighted one is standardised: WCAG's relative luminance is L = 0.2126R + 0.7152G + 0.0722B on linearised channels. Green dominates because human vision is most sensitive to it. A plain average of the three channels is a different, worse answer.
Requires a destination ICC profile and a rendering intent. Change either and the numbers change. Any converter that gives you one answer with no questions asked has silently chosen both on your behalf.
Same problem in reverse, plus a second one: the round trip is not an identity. Converting to CMYK and back does not return your original values, because information was discarded on the way out.
Why RGB to CMYK has no single answer
There is a naive formula, and it is worth seeing precisely so you can recognise what it isn't:
K = 1 − max(R′, G′, B′)
C = (1 − R′ − K) / (1 − K)
M = (1 − G′ − K) / (1 − K)
Y = (1 − B′ − K) / (1 − K)
That is arithmetic, not colour management. It knows nothing about ink, paper, dot gain or the fact that printed cyan is not the mathematical complement of red. It produces numbers that are internally consistent and that no press will reproduce as the colour you started with.
The real conversion goes through the ICC system. An ICC profile, in the consortium's own description, gives a colour management system what it needs to convert between native device spaces and device-independent ones. Both ends connect through a Profile Connection Space — an unambiguous meeting point built on the CIE 1931 standard colorimetric observer, describing how a colour should appear on reference media in a reference viewing environment. Your sRGB value is translated into that neutral space, then out of it into the specific printer's ink percentages.
The out-bound half is where judgement enters, because the destination cannot reproduce everything the source can. ICC defines four rendering intents for handling that:
- Perceptual — shifts everything to fit, trading contrast to preserve detail across the whole tonal range. The usual choice for photographs.
- Relative colorimetric — keeps in-gamut colours exactly where they are and clips the ones that don't fit. The usual choice for logos and brand colours.
- Saturation — favours vividness over accuracy, trading hue to keep pure colours pure. Intended for charts and diagrams.
- Absolute colorimetric — like relative, but also simulates the paper white of the destination. Used for proofing one press on another.
Four intents × every profile in existence = many correct answers to “what is #D9481F in CMYK?”. That question is genuinely underspecified, and any confident single reply to it should be read as an assumption, not a fact.
Gamut: the colours that simply aren't available
A gamut is the set of colours a device can physically produce. sRGB's and a press's overlap substantially but neither contains the other — there are saturated screen colours no four-ink process can hit, and there are printed colours (certain deep cyans, some oranges) outside sRGB. The practical asymmetry is that people design on screens, so the failure they meet is always the same direction: the electric blue, the neon green, the fluorescent orange that looked superb on the monitor comes back from print duller and slightly shifted in hue.
Nothing in the conversion is broken when that happens. The ink to make that colour does not exist in the process. The options are to accept the shift, to redesign around in-gamut colours, or to specify a spot colour — a pre-mixed ink printed from its own plate, which sidesteps the four-ink gamut entirely at the cost of a separate print run.
A soft proof — your design software simulating the destination profile on screen — will show you the shift before it costs you a print run, and gamut-warning overlays will mark the offending areas. It is an imperfect preview on an uncalibrated monitor, but it is enormously better than being surprised.
The practical shape of it
For anything that will be both viewed and printed, the sequence that survives contact with reality is:
- Work in RGB. Wider gamut, smaller files, fewer channels to fight, and every screen destination wants it anyway. Converting early throws away colour you may still need.
- Keep HEX as the canonical record. It is the one notation with no ambiguity and no rounding. Brand palettes belong in HEX; every other form is derived.
- Convert to CMYK once, late, with the destination's profile — and only if the printer asks for CMYK files. Many print-on-demand services want sRGB and run their own conversion, in which case handing them CMYK means the file is converted twice, which is worse than not converting at all. POD file requirements covers what those services actually ask for.
- Never judge a CMYK value by how it looks on your screen. Your monitor is showing you an RGB simulation of it. The only honest preview is a printed proof.
For the conversions that are deterministic — HEX to RGB, RGB to HSL, generating a tint ramp or a triadic set — our colour code converter does them in the browser and shows all the notations at once. Treat any CMYK figure it or any other general-purpose converter shows you as an illustration of the naive arithmetic above, not as a press-ready specification: without your printer's profile, no tool has the information to give you the right one.
Verified July 2026.
Primary sources: International Color Consortium, “Introduction to the ICC profile format” — that a profile supplies what is needed to convert between native device spaces and device-independent spaces, the Profile Connection Space as an unambiguous connection between input and output profiles based on the CIE 1931 standard colorimetric observer and a reference viewing environment, and the four rendering intents including the specific trade-offs quoted for perceptual (contrast for tonal detail) and saturation (hue for vividness); W3C WAI, relative luminance — the formula L = 0.2126 R + 0.7152 G + 0.0722 B and its per-channel linearisation (threshold 0.03928 in the published text, with an erratum noting 0.04045 as the correct IEC value and that the difference is insignificant for 8-bit colour). sRGB is identified by its standard designation IEC 61966-2-1. The naive RGB→CMYK formula is reproduced as common arithmetic and explicitly labelled as not a colour-managed conversion. No specific CMYK profile is recommended here and no total-ink-coverage limits are quoted: those are properties of an individual press and paper, and we could not verify a figure that would be correct for yours. Ask your printer.