Color picker & contrast checker
Convert between HEX, RGB and HSL, explore tints, shades and harmonies, and check text contrast against WCAG 2 thresholds. Click any swatch to copy its hex.
Tints and shades
Harmonies
Contrast checker
Color formats
HEX writes red, green and blue as two hexadecimal digits each, from 00 to FF. RGB gives the same three channels as numbers from 0 to 255. HSL describes the same color as hue (0–360°), saturation and lightness (0–100%), which is easier to adjust by hand. You can type into any field; the others update when the value is valid.
How contrast is calculated
We follow the WCAG 2 definition. Each color is converted to relative luminance (sRGB channels linearized, then weighted 0.2126 R + 0.7152 G + 0.0722 B). The ratio is (L1 + 0.05) ÷ (L2 + 0.05), with the lighter color on top, so it ranges from 1:1 to 21:1.
- AA: at least 4.5:1 for normal text and 3:1 for large text (24px, or 18.66px bold).
- AAA: at least 7:1 for normal text and 4.5:1 for large text.
FAQ
How are tints and shades made?
Tints mix the color with white and shades mix it with black, in even steps in RGB space. The middle swatch is your color.
What are the harmonies based on?
They rotate the hue on the HSL color wheel: complementary is 180° away, analogous is ±30°, triadic is ±120° and split-complementary is 180° ± 30°. Saturation and lightness stay the same.
Does a passing ratio guarantee accessible design?
No. Contrast is one requirement among several. Font weight, size, spacing and color-blind safe use of color all matter too, so treat the ratio as a minimum.
Is the color picker the same in every browser?
The swatch opens your browser's or operating system's native picker, so it looks different on each platform. The values it returns are standard HEX.