Color Converter & Contrast Checker
Convert HEX, RGB and HSL, and check WCAG contrast against white and black.
Loading…
Runs entirely in your browser. Nothing you enter is uploaded or stored on a server.
About this tool
Converting a color between formats is half the job; the other half is whether it can be read. This tool shows the contrast ratio between text and background against the WCAG thresholds — 4.5:1 for normal text and 3:1 for large — so you know before you ship whether a color works.
How to use
- 1Enter the color in any format, or pick it from the picker.
- 2Read the other formats and copy what you need.
- 3Enter a background color to check contrast.
- 4Check the AA and AAA results before committing to the color.
When you need it
- Moving a color from a design into CSS in the format you need.
- Confirming that text over a colored background is readable.
- Building a tint or shade by adjusting lightness in HSL.
Frequently asked questions
What contrast ratio do I need?
WCAG level AA asks for 4.5:1 for normal text and 3:1 for large or bold text. Level AAA raises those to 7:1 and 4.5:1.
Why use HSL instead of HEX?
HSL separates hue from saturation and lightness, so making a lighter or darker version of the same color is one number away instead of guessing a new HEX value.
Does it handle transparency?
Format conversion keeps an alpha channel when you provide one. The contrast check needs two opaque colors, because a transparent color changes contrast depending on what is behind it.
Related tools
- Unix Timestamp ConverterConvert Unix timestamps to dates and back, with ISO, local, Hijri and relative time.
- Number Base ConverterConvert between binary, octal, decimal, hex and any base up to 36. Handles very large numbers.
- XML Formatter & ValidatorFormat or minify XML and check that it is well formed, with the error explained.
- Base64 Encoder / DecoderConvert text to Base64 and back. Handles Arabic and any Unicode text correctly.
- JSON Formatter & ValidatorFormat, minify and validate JSON. Errors point to the exact position.
- URL Encoder / DecoderPercent-encode and decode URLs, and split a query string into readable lines.