Color Converter

Convert colors between HEX, RGB and HSL.

About this tool

Web designers write colors in several formats. A brand guide may give a HEX code, a design tool may show RGB values, and a style sheet may use HSL. This converter turns one into the others and shows a swatch of the color.

How to use it

Pick a color with the color picker or type a HEX code in the box. Short codes such as #36c are expanded to six digits. The tool shows the same color as HEX, RGB and HSL, and you can copy the one you need.

The three formats

HEX writes the red, green and blue parts as three pairs of base 16 digits, for example #3366cc. RGB gives the same three parts as numbers from 0 to 255, for example rgb(51, 102, 204). HSL describes a color by hue, saturation and lightness: hue is an angle from 0 to 360 on the color wheel, and saturation and lightness are percentages.

Why use HSL

HSL is easier to adjust by hand. To make a color lighter, raise the lightness. To make it duller, lower the saturation. To get a related color, move the hue by a few degrees. That is harder to do with HEX or RGB values, where each part moves together in ways that are not obvious.

Accessibility and contrast

Text must contrast enough with its background to be readable. Dark text on a light background, or the reverse, works best. Avoid using color alone to show meaning, because some people cannot tell certain colors apart. Test your colors with a contrast checker before you publish.

Rounding

Converting to HSL rounds the values to whole numbers, so converting back may differ by a small amount. The HEX and RGB values are exact.

Common examples

White is #ffffff or rgb(255, 255, 255). Black is #000000. Pure red is #ff0000, which is hue 0 with full saturation and 50 percent lightness.

Privacy

The conversion happens in your browser and nothing is sent anywhere.

Frequently asked questions

Is the color converter free to use?

Yes. The color converter on QuickKit is free, needs no signup and has no usage limit.

Is my data safe when I use the color converter?

Yes. The color converter runs in your browser. What you enter is processed on your device and is not uploaded to a server.

Does the color converter work on a phone?

Yes. The page is built to work on phones, tablets and desktop browsers without installing anything.

More free tools