Colour Code Converter
Converts colours between HEX, RGB, RGBA, HSL, HSLA, HSV, CMYK, LAB and named CSS colours.
Calculates WCAG contrast ratio between two colours and reports AA and AAA pass or fail for normal and large text.
The Colour Contrast Checker calculates WCAG contrast ratio between two colours and reports AA and AAA pass or fail for normal and large text. It runs as plain JavaScript inside the page, which means there is no upload step, no queue and no size limit imposed by a server — the only limit is your own device.
| AA normal text | 4.5:1 minimum |
|---|---|
| AA large text | 3:1 minimum (18pt, or 14pt bold) |
| AAA normal text | 7:1 minimum |
| UI components and graphics | 3:1 minimum against adjacent colours |
This tool uses the WCAG 2.1 relative luminance formula, giving a ratio from 1:1 (identical) to 21:1 (black on white). Every intermediate value is shown on screen, so the result can be checked by hand.
Converts colours between HEX, RGB, RGBA, HSL, HSLA, HSV, CMYK, LAB and named CSS colours.
Picks any colour and shows its HEX, RGB, HSL, HSV, CMYK and LAB values, plus tints, shades and…
Converts HEX colour codes to RGB and RGBA values, handling 3, 4, 6 and 8 digit hex.
Converts RGB and RGBA values into HEX colour codes, including 8-digit hex with alpha.
Converts between HSL, HEX and RGB, so you can adjust lightness and saturation predictably.
Converts between CMYK and RGB or HEX for print work, with a note on gamut differences.
Builds harmonious palettes from a base colour using complementary, analogous, triadic…
Generates a full 50-950 scale of tints and shades from one colour, ready to paste as CSS…
Shows how a colour or palette appears to people with protanopia, deuteranopia, tritanopia and…
Finds the nearest Tailwind colour class for any hex value, and shows the hex for any Tailwind…