๐ŸŽจ

Color Converter & Contrast Checker

Convert colours between HEX, RGB and HSL, pick a colour visually, and check WCAG contrast against white and black text.

Aa White textAa Black text

About this tool

Type a HEX code or use the picker to get the same colour in RGB and HSL, ready to paste into CSS. The swatch previews white and black text on your colour.

Contrast ratios follow the WCAG 2 formula. For normal body text, 4.5:1 meets level AA and 7:1 meets AAA; large text (about 24px, or 19px bold) needs 3:1 for AA. Good contrast makes your site readable for everyone, including people with low vision.

Frequently asked questions

What is the difference between HEX and RGB?

They describe the same colour. HEX writes the red, green and blue values (0โ€“255) in base 16, e.g. #ff8800 = rgb(255, 136, 0).

When should I use HSL?

HSL (hue, saturation, lightness) makes it easy to create lighter or darker shades of the same colour by changing only the lightness.

Learn more

More tools