Color Models and Usage Guide
Digital displays, web development, and print publishing require distinct color representations:
- HEX and RGB (additive screen mixing):RGB defines additive light for screens (0–255 per channel). HEX is its hexadecimal shorthand widely used in CSS.
- HSL (perceptual hue wheel):HSL (Hue, Saturation, Lightness) aligns with human perception, making it easy to create hover states and dark-mode palettes.
- CMYK (subtractive ink model):Subtractive model for print inks (Cyan, Magenta, Yellow, Black). Screens must convert RGB to CMYK for accurate physical printing.
Under the hood
parseAnyColor() tries the accepted notations in turn — hex with or without the hash, three- and six-digit forms, rgb() and hsl() functions, and named colours — and normalises whatever it recognises into RGB. From there rgbToHsl(), rgbToCmyk() and rgbToHex() derive the other spaces, hslToRgb() handles the inverse, and renderShades() plus renderHarmonies() generate the tint and complement sets you would otherwise look up in a palette tool. Swatches are painted on a canvas so the comparison is not affected by CSS colour management.
Formats, sizes and other limits
CMYK values are computed from RGB with a naive formula, which is fine for design hand-off and wrong for print: real conversions depend on the ink set, paper and ICC profile, so a press will not match the numbers shown. Alpha is not modelled — an eight-digit hex or an rgba() value loses its transparency channel. Harmony generation works in HSL, which is perceptually uneven, so the "complementary" colour is a rotation rather than a measured contrast pair.
Privacy: nothing is uploaded
Colour values are numbers you typed; conversion and palette generation happen on canvas in this tab, with no image, request or account involved.
Frequently asked questions
Can I use the CMYK values for print?
As a starting point only. Proper separation needs an ICC profile and the printer's ink specification; a browser-side formula cannot reproduce that.
What happens to transparency?
It is dropped. The tool works in solid RGB, so an rgba() input converts on its colour and ignores the alpha value.
Are the harmony colours accessible?
Not necessarily. They are rotations in HSL, not contrast-tested pairs — run them through the contrast checker before using them for text.