Color Converter

Convert between HEX, RGB and HSL, and check contrast for readable text.

HEX

—

RGB
—
HSL
—
Contrast on white
—
Contrast on black
—
How this was calculated

Contrast follows WCAG: 4.5 or more passes for normal text, 3 or more for large text.

About the Color Converter

Color Converter converts between HEX, RGB and HSL, and checks text contrast against white and black using WCAG, the web accessibility standard.

How to use it

  1. Enter a color as HEX, rgb() or hsl().
  2. Copy the other formats.
  3. Check the contrast ratings before using it for text.

Example

Utilwell's Level green #D4F25A is rgb(212, 242, 90) and hsl(72, 85%, 65%). As text it fails on white (1.26:1) but passes AAA on black (16.65:1).

Questions

What contrast do I need?

4.5:1 for normal text (AA), 3:1 for large text, and 7:1 for the stricter AAA level.

Can I enter short HEX like #fff?

Yes. Three-digit HEX is expanded automatically.

Does it support transparency?

Alpha values are ignored; the color is treated as solid.