websystemer / color-tools

Color Converter & Contrast Checker

Convert colors between HEX, RGB and HSL and check text contrast against WCAG AA and AAA. Runs in your browser.

Convert
Contrast checker (WCAG)
Large text, 24px bold
Normal body text at 15px. The quick brown fox jumps over the lazy dog.

Color formats

Type or paste a color as HEX (#2b59ff, with or without alpha), rgb() or hsl() and every other format is shown beside it, ready to copy.

How contrast is measured

The ratio compares the relative luminance of two colors, from 1:1 (identical) to 21:1 (black on white). WCAG 2 asks for at least 4.5:1 for normal text and 3:1 for large text (about 24px, or 19px bold) at level AA. Level AAA raises those to 7:1 and 4.5:1. User interface parts such as input borders and icons need 3:1.

Privacy

All calculations run in your browser. Nothing is uploaded.

More tools