Color Converter: HEX, RGB & HSL

Enter a color to get its HEX, RGB and HSL values, then explore lighter, darker and related colors.

Color value

Use HEX, RGB, HSL or a CSS color name, without transparency.

Normalized color

CSS names:

Compare black and white text

This compares black and white text on the selected background. Check the result for your text size before choosing either one.

Color relationships

Tints toward white

Shades toward black

Five steps mix the sRGB channels toward white or black: 0%, 25%, 50%, 75% and 100%. Equal numeric steps may not look equally spaced.

Supported color inputs and errors →

Convert a color

Paste a color value or CSS name such as navy. The converter turns it into a single opaque sRGB value and shows the equivalent formats. If an input is unsupported, the error explains what to change.

How to use the converter

  • Enter three- or six-digit HEX, comma-separated integer RGB, HSL with percentage saturation and lightness, or a CSS named color.
  • Read the normalized #RRGGBB value and its RGB and HSL equivalents. All previews use that same color.
  • Copy the format your next tool needs. Keep the commas and percent signs in RGB and HSL input.
  • Compare black and white text, or choose a related color to check in the contrast tool.

Explore related hues

The complement turns the HSL hue by 180 degrees. The two analogous colors sit 30 degrees either side of the original. Use them to explore a palette, then check any text and background pair you plan to use.

Make lighter and darker versions

Tints mix the stored sRGB channels toward white; shades mix them toward black. The five steps use 0%, 25%, 50%, 75% and 100%, with channels rounded to integers. The steps are repeatable, though they may not look equally spaced.

Sources and further reading