How to use it
Use the picker or type a HEX code; the RGB fields and HSL sliders stay in sync, and you can copy any format. In the contrast checker, set a text colour and a background β the ratio and the WCAG AA/AAA pass/fail badges update live, with a sample-text preview.
HEX, RGB and HSL β what they mean
- HEX β
#RRGGBB, the webβs common notation (each pair is 0β255 in hex). - RGB β red, green, blue from 0β255; how screens mix colour.
- HSL β hue (0β360Β°), saturation and lightness (0β100%); intuitive for tweaking shades and tints.
WCAG contrast targets
| Text | AA | AAA |
|---|---|---|
| Normal | 4.5 : 1 | 7 : 1 |
| Large (β₯24px, or β₯18.66px bold) | 3 : 1 | 4.5 : 1 |
Aim for at least AA on all text; prefer AAA for long-form body text. Contrast ratio runs from 1:1 (invisible) to 21:1 (black on white).
Sources & notes
Standard sRGB conversions; contrast uses the WCAG 2.x relative-luminance formula. Computed locally.
More developer tools: Base64 Encode/Decode, JSON Formatter.
Frequently asked questions
How do I convert HEX to RGB or HSL?
Type or pick a colour and all three formats update together β HEX (#RRGGBB), RGB (0β255 per channel) and HSL (hue 0β360Β°, saturation and lightness 0β100%). Copy any format with one click.
What is a WCAG contrast ratio?
It measures how readable text is against its background, from 1:1 (no contrast) to 21:1 (black on white). WCAG sets minimums for accessibility: normal text needs at least 4.5:1 for AA and 7:1 for AAA; large text (about 24px, or 18.66px bold) needs 3:1 for AA and 4.5:1 for AAA.
Which contrast level should I aim for?
AA (4.5:1 for normal text) is the common legal/standard target for websites. AAA (7:1) is stricter and ideal for body text where readability matters most. If you only pass 'large text', increase the font size or pick a higher-contrast colour for small text.
Why does HSL sometimes shift by 1 when I convert back?
HSL values are whole numbers here, so converting HEX β HSL β HEX can drift by one step in a channel due to rounding. That is normal for any integer HSL tool and is visually identical.
Is anything uploaded?
No. All conversions and contrast checks run in your browser.