Color Converter

Design tools, CSS and brand guidelines each speak a different color format. Enter any hex value, pick a color, and get RGB, HSL and the contrast ratios you need for accessible text.

How to use the Color Converter

  1. Type a hex code or use the color picker.
  2. Read the RGB, HSL and HSV values.
  3. Check the contrast ratios.

Formula

HSL: hue in degrees, saturation and lightness in percent. Contrast uses WCAG relative luminance.

Worked examples

#1d4ed8
rgb(29, 78, 216)

Frequently asked questions

What contrast ratio do I need?

4.5:1 for normal text and 3:1 for large text under WCAG AA.

Why do HSL and HSV differ?

HSL models lightness; HSV models brightness. The same color has different numbers in each.

Does hex support transparency?

This tool reads #RGB and #RRGGBB. CSS also allows #RRGGBBAA, but alpha is not handled here.