How to use this tool
- Enter #RGB, #RRGGBB, comma-separated rgb(), or comma-separated hsl() notation.
- Select Convert color to see all three representations and the swatch.
- Copy the output and use the representation supported by your destination.
Understanding the output
HEX and RGB describe red, green, and blue channels. HSL describes hue, saturation, and lightness within the same sRGB model. HSL input is converted to integer RGB channels, and the displayed HSL output is recalculated from those rounded channels.
When placing a color value inside a data object, use the HTML Entity Converter to check the surrounding JSON syntax.
Three ways to describe red
#f00 expands to #ff0000, rgb(255, 0, 0), and hsl(0, 100%, 50%). These represent the same opaque sRGB color.
Choose notation for the editing task
HEX is compact and common in design specifications. RGB makes channel values explicit. HSL can be convenient when adjusting hue or making a rough change in saturation and lightness. These are different descriptions of an sRGB color, not conversions between display color spaces such as Display P3 or a print profile.
The preview helps catch a mistyped channel or an unexpected hue, but the screen and viewing conditions affect appearance. For print work or color-critical production, use a managed workflow and the correct destination profile.
Rounding and accessibility are separate concerns
Converting an arbitrary HSL value to eight-bit RGB requires rounding, so converting back may not reproduce every original decimal exactly. The tool reports HSL to two decimal places for readability. It does not calculate text contrast or certify that a foreground/background combination meets an accessibility standard; that requires checking the pair of colors together.
Method and supported input
HEX values are expanded into integer RGB channels. HSL conversion uses the standard chroma, secondary component, and lightness offset relationships. Output uses opaque eight-bit sRGB channels.
- The color is opaque and belongs to the sRGB model.
Limitations
- Alpha, named colors, modern space-separated syntax, and other color spaces are not supported.
- The swatch is not a contrast checker or a calibrated color proof.
Common questions
Why did my HSL decimals change after conversion?
HSL input is rounded to integer RGB channels before the output HSL is recalculated, so small differences are expected.
Can I use an eight-digit HEX color?
No. Eight-digit HEX includes alpha. This utility currently accepts only opaque three- and six-digit HEX values.