Color converter

Get the same colour in every format designers and developers use.

HEX
#E11D48
RGB
rgb(225, 29, 72)
HSL
hsl(347, 77%, 50%)
Contrast with white text
4.7:1 · AA
Contrast with black text
4.47:1 · AA large text only
Color converter: illustration of a code editor with brackets, a colour swatch and a settings gear
Color converter is part of our free Developer tools collection. It works in your browser on phones, tablets and computers, with no sign-up.

How to use the color converter

  1. Type a colour (#e11d48, rgb(225,29,72) or hsl(…)) or use the picker.
  2. Copy the HEX, RGB or HSL value.
  3. Check the contrast ratio for readable text.

When it's useful

  • Matching brand colours between design tools and code
  • Checking if text on a colour will be readable
  • Converting HEX codes to RGB for apps

Limits to know

  • Contrast is the WCAG 2 formula; 4.5:1 is the usual minimum for normal text.

Your privacy

Everything is worked out in your browser. What you type isn't uploaded, saved or shared, and there's no sign-up.

What goes in and what comes out

Input:
A HEX, RGB(A) or HSL(A) colour, or one picked visually.
Output:
The colour in HEX, RGB and HSL plus its contrast with white and black.

Questions

What contrast do I need?

WCAG asks for at least 4.5:1 for normal text and 3:1 for large text.

Related reading

Related tools