Color Converter
Enter a color value in HEX, RGB, or HSL format and see it converted to all other formats instantly. All processing happens locally in your browser.
Contrast against plain backgrounds
About Color Formats
- HEX -
#rrggbb, the most common CSS color format. - RGB -
rgb(r, g, b), each channel 0-255. - HSL -
hsl(h, s%, l%), hue 0-360°, saturation and lightness 0-100%.
Anything the browser understands is accepted, including a name like rebeccapurple, an eight digit hex with alpha, and the space separated form with a slash before the alpha that current CSS uses. The contrast figures follow the WCAG formula for relative luminance, so a ratio of 4.5 is the threshold for normal body text at level AA and 7 is the threshold at AAA. Those figures are calculated against the opaque colour, because a translucent one has no fixed contrast until you know what sits behind it.
Related tools
Is the markup fighting you?
Escaped entities, mangled encodings and content that renders one way in the CMS and another on the page usually mean something in the pipeline is guessing. We build front ends and the publishing path behind them, so what you write is what a visitor sees.
Talk to us about your site