Color converter and contrast checker
HEX, RGB, HSL, HWB, OKLCH and CMYK conversion, WCAG contrast checker and palettes.
Color not recognised. Try #hex, rgb(), hsl(), hwb(), oklch() or a CSS color name.
Formats
- hex
- rgb
- hsl
- hwb
- oklch
- cmyk
Contrast checker (WCAG)
Background:
- AA normal text
- AA large text
- AAA normal text
- AAA large text
Readable heading
The quick brown fox jumps over the lazy dog. 0123456789
Tints, shades and harmonies
Click a swatch to copy it, double-click to make it the main color.
Runs entirely in your browser. Your files never leave your device.
About this tool
Type a color in any CSS format, pick it with the color picker or paste a name like “tomato”, and get it in HEX, RGB, HSL, HWB, modern OKLCH and an approximate CMYK for print, each ready to copy into your stylesheet or design tool.
The contrast checker shows the WCAG ratio between your color and a text color, with a live preview and the AA and AAA verdicts for normal and large text, so you can make accessible buttons and banners. Below, eleven tints and shades and five classic harmonies (complementary, analogous, triadic, split and tetradic) help you build a palette from one color. The link always reopens the current color.
How it works
- Enter a color (#hex, rgb(), hsl(), hwb(), oklch() or a CSS name) or use the picker.
- Copy the format you need.
- Set a text color to check readability; swap the two colors with one click.
- Click a swatch to copy it, double-click to use it as the new main color.
Contrast follows the WCAG 2.2 formula based on relative luminance. AA requires 4.5:1 for normal text and 3:1 for large text (24 px, or 18.5 px bold); AAA requires 7:1 and 4.5:1. CMYK is a device-independent approximation: printers convert with their own color profile.
Worked example
Type “tomato”: you get #FF6347, rgb(255 99 71), hsl(9 100% 64%), its OKLCH value and an approximate CMYK for print. Set white as the text colour and the ratio of about 2.9:1 shows that white text on tomato fails AA for normal text; the darker shades below give alternatives that pass.
The triadic harmony then proposes two companion colours spaced 120° apart on the colour wheel for a three-colour palette.
Good to know
- OKLCH keeps brightness consistent when you change the hue, which makes it the easiest format to build shades and themes.
- CMYK values here are approximate; ask your printer for the profile they use for exact print colours.
- Save the link: it reopens the same colour, handy to share with a designer or a client.