Module
Color Harmonizer — HEX, RGB, HSL & CMYK Converter
HEX, RGB, HSL & CMYK
Module
HEX, RGB, HSL & CMYK
Take the CSS named color tomato, RGB (255, 99, 71). As hex, each channel converts to two base-16 digits: 255 → FF, 99 → 63, 71 → 47, giving #FF6347. For HSL: lightness is the midpoint of the highest and lowest channel — (255 + 71) / 2 / 255 ≈ 64%. Saturation compares the spread between channels to that midpoint and works out to 100% here, since red is fully saturated. Hue is derived from which channel is highest and by how much, landing at 9° — just past pure red (0°) toward orange. So the same color is hsl(9, 100%, 64%). Converting to CMYK: since red is already maxed out, cyan and key (black) both come out at 0%; magenta and yellow absorb the gap between the other two channels and red, landing around 61% magenta, 72% yellow.
A second example, closer to home: this site's own accent color is #0891B2 — RGB (8, 145, 178). Run it through the same math and you get hsl(192, 91%, 36%): a deeply saturated, moderately dark blue-cyan, which is exactly why it reads as a strong accent against a near-black background rather than washing out. In CMYK it's roughly 96% cyan, 19% magenta, 0% yellow, 30% key — heavy on cyan ink, as the name on the hex code already gives away.
Use HEX or RGB for anything on a screen (websites, apps, UI design), HSL when you need to programmatically generate related shades, and CMYK only when preparing artwork for physical printing.
RGB is additive (screens start from black and add light) and CMYK is subtractive (paper starts white and ink is subtracted from it), so there's no single universal formula that converts perfectly between them — the "right" conversion depends on the specific inks and paper involved. This tool uses the standard naive conversion (deriving K from the darkest channel, then C/M/Y from what's left), which is accurate enough for previewing how a color leans in print, but a real print run color-matched against a screen design should go through your printer's actual ICC profile, not a generic RGB→CMYK formula. It's also why CMYK is the one format here that doesn't round-trip cleanly: converting HEX → RGB → HSL → HEX returns exactly where you started, since those three are equivalent descriptions of the same additive color, but HEX → CMYK → HEX can land a shade off, especially for very dark or desaturated colors, because the CMYK step isn't a lossless reformatting of the same numbers.
Skip this tool for anything requiring perceptually uniform color spaces (like LAB or OKLCH) used in advanced design-system tooling — HSL is intuitive but not perceptually uniform, meaning equal steps in hue or lightness don't always look like equal visual steps.