Skip to content

Color Converter

Convert HEX, RGB and HSL colors.

FREE TO USENO SIGN-UP REQUIREDBROWSER-BASED
#159447
rgb(21, 148, 71)
hsl(144, 75%, 33%)

Type a HEX, rgb() or hsl() value and all three forms are shown. The conversion runs in your browser — the color never leaves the page.

›

A worked example

01 / EXAMPLE
INPUT → OUTPUTEXAMPLE
#159447

=> rgb(21, 148, 71) · hsl(144, 75%, 33%)

The same green shown three ways; pick the form your stylesheet or design tool expects.

›

How to convert a color

02 / STEPS
  1. 01Enter a color — Type a HEX, rgb() or hsl() value into the input box.
  2. 02Read the others — The other two formats appear on the right with a preview swatch.
  3. 03Copy what you need — Click COPY next to the format your project expects.
›

The three notations

03 / FEATURES

HEX

A # followed by six (or three) hex digits. The compact form used in CSS and design tools.

RGB

Three numbers from 0 to 255 for red, green and blue. Easy to read and edit.

HSL

Hue in degrees plus saturation and lightness in percent. Intuitive for shifting a shade.

›

Troubleshooting

04 / GUIDE

If the outputs show dashes, the input was not a recognised color — check the HEX has six digits, rgb() values are 0–255, and hsl() uses percentages for s and l. The swatch renders transparent when parsing fails, so a missing preview is a quick signal something is off.

›

Frequently asked questions

05 / FAQ
Which formats can I type?

A 3- or 6-digit HEX (with or without #), an rgb(r, g, b) value, or an hsl(h, s%, l%) value.

Why does the preview look wrong?

The input was not a valid color. Fix the value and the swatch and outputs will update.

Are values rounded?

HSL is rounded to whole degrees and percentages for readability; RGB stays exact.

Does it support alpha (transparency)?

This version handles opaque colors only. rgba() and hsla() with an alpha channel are not parsed yet.

›

Related tools

06 / RELATED