Skip to content
Browser tool Runs locally

Color Converter

Convert colors between HEX, RGB, and HSL with a visual preview.

Color converter
#2563EB
rgb(37, 99, 235)
hsl(221, 83%, 53%)

Conversion is calculated locally in your browser.

Convert a color for CSS and design notes

Enter a six-digit HEX color and leave the field, or adjust the R, G, and B controls. The preview and the equivalent HEX, RGB, and HSL values update together. Use the copy button beside the format you need when moving a color between a stylesheet, a design specification, and a bug report.

For example, the default blue is represented by these values:

#2563EB
rgb(37, 99, 235)
hsl(221, 83%, 53%)

The HEX and RGB forms describe the same channel values. The HSL output rounds hue, saturation, and lightness to whole numbers, so converting that rounded HSL back elsewhere may produce a small channel difference.

How the three formats describe a color

FormatWhat the values mean
HEXThree hexadecimal pairs for red, green, and blue
RGBRed, green, and blue channels, each from 0 to 255
HSLHue in degrees; saturation and lightness as percentages

In #2563EB, the pairs 25, 63, and EB correspond to decimal channel values 37, 99, and 235. HSL can be more convenient for discussing a color's hue or lightness, while RGB is useful when matching individual channels.

Use the converted value in a stylesheet

.notice {
  color: #2563EB;
  border-color: rgb(37, 99, 235);
}

Copy the whole output, including the leading hash for HEX or the function name for RGB and HSL. After editing a larger stylesheet, CSS Validator can help inspect its syntax.

Supported inputs and common mistakes

The HEX field accepts six digits with or without a leading hash and is applied when you leave the field, for example by pressing Tab. Three-digit shorthand, eight-digit alpha values, and named colors such as royalblue are not supported. An invalid HEX entry leaves the previous converted color in place.

Use whole-number RGB channels between 0 and 255. The tool displays HSL as an output; it does not have an HSL input control. It converts opaque RGB colors and does not preserve an alpha channel, CMYK values, or a color profile.

Color conversion does not measure readability

Equivalent color formats do not establish whether text has sufficient contrast against its background. Check the foreground and background together with a contrast checker when choosing text colors. Browser rendering and display calibration can also affect how a preview looks.

The calculations run in your browser. No image or color input is uploaded to an Odelvo processing server.

Frequently asked questions

What HEX format is supported?
The input accepts standard six-digit RGB hex colors such as #2563EB.
Are alpha values included?
No. This version converts opaque RGB colors only; it does not add an alpha channel.
Does conversion happen locally?
Yes. The calculations run in your browser.

Related tools