EzyTools

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

  1. 1Enter the color in any format, or pick it from the picker.
  2. 2Read the other formats and copy what you need.
  3. 3Enter a background color to check contrast.
  4. 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