HEX to HSL
Convert an opaque HEX color into hue, saturation and lightness.
Your workspace
Processed in your browserThis utility converts a standard six-digit or shorthand three-digit HEX color code into the HSL (Hue, Saturation, Lightness) color space. This conversion helps developers align color definitions with CSS standards that rely on HSL for easier color manipulation.
How to convert HEX to HSL
- Enter your HEX color code into the input field (e.g., #ff0000 or f00).
- The tool automatically calculates and displays the equivalent HSL values, such as hsl(0, 100%, 50%).
Color space limitations
The output uses the sRGB color space, which is standard for web browsers. Because HEX and HSL are different ways of representing the same color data, the conversion is mathematically precise, though the resulting HSL values are rounded to two decimal places for readability.
Example conversion
#ff0000
hsl(0, 100%, 50%)
Questions about HEX to HSL
Does this support alpha channels?
No, this tool only accepts standard three- or six-digit HEX codes without alpha transparency.
How do I interpret the HSL output?
The result is formatted as hsl(H, S%, L%), where H is the degree on the color wheel (0-360), and S and L are percentages representing saturation and lightness.
Continue your workflow
Explore more tools in this category for your next step.
RGBA to HEX with Alpha
Encode red, green, blue and opacity values as an eight-digit CSS HEX color.
Color Blend Calculator
Mix two colors by a chosen proportion using sRGB channels or linear-light RGB.
Color Blindness Simulator
Apply approximate protanopia, deuteranopia or tritanopia RGB matrices to an uploaded image; simulations do not diagnose vision.
Color Inverter
Invert an opaque HEX color by subtracting RGB channels from 255.