Color Converter & Contrast Checker

Convert one color into HEX, RGB and HSL and see whether text in that color would be readable on white or black.

  • Free, no sign-up
  • Runs in your browser
  • Verified
Accepts HEX (3 or 6 digits), rgb() and hsl().

How to use it

  1. Enter a color value.
  2. Read the other formats.
  3. Check the contrast results before using it for text.

How it works

RGB values are 0 to 255 per channel. HSL is derived with the standard formulas and rounded to whole numbers, so converting back may differ by one step.

RGBA is the same color with an alpha (opacity) value; this tool shows it fully opaque (1). CMYK uses the simple formula K = 1 − max(R, G, B) and is not a print-profile conversion.

Contrast ratio = (L1 + 0.05) ÷ (L2 + 0.05), where L is relative luminance as defined by WCAG. WCAG AA needs 4.5:1 for normal text and 3:1 for large text; AAA needs 7:1.

Examples

  • #FF0000 is rgb(255, 0, 0) and hsl(0, 100%, 50%).
  • Black on white has a contrast ratio of 21:1.

Limitations

  • Only sRGB colors are supported.
  • Contrast ratios are a guideline for text; they do not replace testing with real users.

References

Last verified . See our Accuracy & Editorial Policy. Found a problem? Email contact@tools.gift.