How it is calculated
HEX and RGB describe the same color: three amounts of red, green and blue from 0 to 255, written in HEX as two-digit hexadecimal numbers (FF = 255). HSL describes hue (0–360°), saturation and lightness – handy for making a color lighter or paler.
CMYK are the print colors cyan, magenta, yellow and black. The conversion here is an approximation without a color profile; your print shop can give you exact values.
The contrast follows the WCAG 2 web guidelines:
Contrast = (L₁ + 0.05) ÷ (L₂ + 0.05)
L₁ and L₂ are the relative luminances of the lighter and the darker color. For normal text, WCAG AA requires at least 4.5 : 1, for large text 3 : 1.
Example
Kalkino green #0a7558 is rgb(10, 117, 88) in RGB and hsl(164, 84%, 25%) in HSL. White text on it reaches a contrast of 5.68 : 1 – enough for WCAG AA.
Frequently asked questions
What does the short form #fa0 mean?
Each digit is doubled: #fa0 is the same as #ffaa00.
What contrast is enough?
For body text at least 4.5 : 1 (WCAG AA), better 7 : 1 (AAA). Large text from about 24 px, or bold from 19 px, needs at least 3 : 1.
Why does the color look different in print?
Screens mix light (RGB), printers mix ink on paper (CMYK). Some bright screen colors simply cannot be printed.
Can I enter color names like “red”?
No, the converter understands HEX, RGB and HSL. For named colors, use the HEX value, e.g. #ff0000 for red.