Color Converter (HEX, RGB, HSL)→Specialized Version
🎨

HEX to HSL Converter

Convert HEX to HSL

HEX in
#3B82F6
HSL out
hsl(217, 91%, 60%)
RGB
HSL

All formats

Lightness variations

HEX to HSL Converter

Convert HEX color codes to HSL (Hue, Saturation, Lightness) format. HSL is a more intuitive color model that makes it easier to understand and modify colors compared to HEX or RGB.

Understanding HSL

HSL represents colors using three components that match how humans perceive color:

  • Hue (H): The color itself, measured as an angle from 0-360° on the color wheel (red=0°, green=120°, blue=240°)
  • Saturation (S): Color intensity from 0% (gray) to 100% (full color)
  • Lightness (L): How light or dark, from 0% (black) to 100% (white)

Why Use HSL?

HSL is preferred for color manipulation because:

TaskHSL Approach
Make color lighterIncrease L value
Make color darkerDecrease L value
Make more vibrantIncrease S value
Make more mutedDecrease S value
Get complementaryAdd 180° to H

HEX to HSL Conversion Examples

ColorHEXHSL
Red#FF0000hsl(0, 100%, 50%)
Green#00FF00hsl(120, 100%, 50%)
Blue#0000FFhsl(240, 100%, 50%)
Orange#FFA500hsl(39, 100%, 50%)
Purple#800080hsl(300, 100%, 25%)

CSS HSL Syntax

``css .element { color: hsl(220, 80%, 50%); background-color: hsl(220, 80%, 95%); } `

Adjusting Colors with HSL

Creating color variations is simple:

  • Lighter shade: Keep H and S, increase L
  • Darker shade: Keep H and S, decrease L
  • Pastel: Keep H, reduce S, increase L
Use this converter to translate HEX codes to the more intuitive HSL format.

A Full Ramp From This Colour

Design systems settle on a 50–900 scale because it covers backgrounds, borders, text and states without anyone reaching outside the palette. Mixing toward white and black rather than adjusting HSL lightness keeps more of the hue's character:

StepColourContrast on whiteSafe for
50#F5F9FF1.06:1backgrounds and fills
100#EBF3FE1.12:1backgrounds and fills
200#CEE0FD1.34:1backgrounds and fills
300#B1CDFB1.62:1backgrounds and fills
400#76A8F92.40:1backgrounds and fills
500#3B82F63.68:1large text, borders
600#326FD14.85:1body text on white
700#295BAC6.59:1body text on white
800#2048878.98:1body text on white
900#18346212.31:1body text on white
The contrast column is the one that decides usage. Steps below 3:1 cannot carry text at any size and belong in fills and dividers; steps at 4.5:1 and above are safe for body copy.

Adjusting It

Base colour in HSL is hsl(217, 91%, 60%). Two useful moves:

`css /* +10% lightness, same hue */ --lighter: #6da2f8; /* −10% lightness */ --darker: #0b64f4; ``

Raising lightness also drops perceived saturation, so a lightened colour reads greyer than its numbers suggest. Adding 5–10% saturation alongside every 20% of lightness keeps the ramp looking like one hue rather than a fade to grey.

Frequently Asked Questions

What is HSL when working with HEX to HSL?

Hue, Saturation, Lightness - a more intuitive color model.

HSL vs RGB when working with HEX to HSL?

HSL is easier for humans to understand and modify. RGB is better for computers.

What is hue when working with HEX to HSL?

Hue is the color type, measured in degrees around the color wheel (0-360).

Related Tools

Explore other tools you might find useful:

More Color Converter (HEX, RGB, HSL) tools

You might also need