Skip to content
Hex Color Picker

Blog

HSL for Designers: How to Build Tints, Shades and Color Scales

By the Hex Color Picker Team. Published . 8 minute read.

HSL is the most designer-friendly way to adjust a color, because it separates the three things you actually think about: which color (hue), how vivid (saturation) and how light (lightness). To make a color darker, you lower one number. To make a family of tints and shades for a button, a chart or a theme, you step that number through a series. In hex or RGB the same job means recalculating three channels each time.

This guide shows how to build lightness scales, hover and pressed states and theme variations with HSL, and where HSL misleads you, because its lightness number is not the same as how bright a color looks. You can follow along with the HSL color picker, and convert any result back to hex with the HSL to hex converter.

The three numbers

An HSL color is written hsl(210, 100%, 56%), or hsl(210 100% 56%) in the newer space-separated syntax. The three values mean:

That is dodgerblue, #1E90FF, written as hsl(210, 100%, 56%): a hue of 210 degrees (blue leaning toward cyan), fully saturated, and a little lighter than the midpoint.

If you want to see where a hex code lands in HSL, the hex to HSL converter shows it, with the arithmetic explained. And for the other formats, see Hex, RGB, HSL and CMYK explained.

Building a lightness scale

The simplest scale keeps hue and saturation fixed and steps the lightness. For hue 210 at full saturation, six steps from light to dark are:

LightnessHexUse
90%#CCE6FFPale backgrounds
75%#80BFFFSoft fills, disabled states
60%#3399FFBright accents
45%#0073E6Buttons, links
30%#004D99Hover and pressed, headings
15%#00264DVery dark text and surfaces

You can see the whole scale at a glance:

This is a quick, workable scale, and it is the reason designers like HSL. You made six related colors by changing one number, and every one of them is clearly the same hue family.

Fixing the neon problem

The scale above has a weakness: every step has 100% saturation. A color at 100% saturation and 90% lightness, such as #CCE6FF, looks like a very pale blue, which is fine. But at the other end, very dark steps at full saturation, like #00264D, can look intense and slightly electric. In real interfaces, saturation usually needs to fall as you get far from the middle of the lightness range. Pale and very dark colors look more natural when they are a little greyer.

Here is the same hue at 60% saturation across six lightness steps:

These look calmer and more like the blues used in professional interfaces: softer backgrounds at the light end, and richer but less glowing blues at the dark end.

A practical recipe: keep hue constant, hold saturation near your brand value for the middle steps, and lower it by 10 to 30 points for the lightest and darkest steps. Then look at the result on screen and adjust by eye.

Hover, pressed and disabled states

States are where HSL pays for itself. Starting from hsl(210, 100%, 56%) (which rounds to #1F8FFF):

StateHSLHex
Basehsl(210, 100%, 56%)#1F8FFF
Hoverhsl(210, 100%, 48%)#007AF5
Pressedhsl(210, 100%, 42%)#006BD6
Lighter or disabledhsl(210, 100%, 70%)#66B3FF

Hover is 8 points darker, pressed is 14 points darker, and disabled is lighter and, if you like, less saturated. The rule is simple enough to put in CSS, so every button color on the site follows it automatically:

:root { --h: 210; --s: 100%; }
.button         { background: hsl(var(--h) var(--s) 56%); }
.button:hover   { background: hsl(var(--h) var(--s) 48%); }
.button:active  { background: hsl(var(--h) var(--s) 42%); }

Change --h to 340 and the whole set becomes pink, with the same relationships between states. Remember to recheck contrast for the text on each state, since white text on a color that gets lighter on hover may stop passing. The color contrast guide covers the thresholds.

Reusing a scale in dark mode

A lightness scale also gives you most of a dark theme for free. In light mode, pages use the pale end of the scale for backgrounds and the dark end for text. In dark mode, you flip the roles: the dark end becomes the background and the pale end becomes the text. Two adjustments usually help. First, raise the lightness of your accent color a little, because a color that looked rich on a pale page often looks heavy on a dark one. Second, reduce the saturation of large dark surfaces, since big areas of strongly saturated dark color feel oppressive. Because everything is expressed as lightness steps, you can make both changes by editing a few numbers instead of picking new colors from scratch.

Neutrals with a tint

HSL is also a good way to design greys. A pure grey has 0% saturation. A tinted grey keeps the hue of your brand color at a very low saturation:

The second looks more at home next to a blue brand color, because it shares its hue family. This is how a page background such as this site's #EEF1F7 can feel neutral while still belonging to the palette. Use the same hue as your base, between 10% and 30% saturation, and vary only lightness for a whole set of neutrals.

Where HSL misleads you

HSL is a rearrangement of RGB, and its lightness is a geometric value: the average of the largest and smallest channels. It is not how bright the eye perceives the color. Compare the six main hues, each at 100% saturation and 50% lightness:

ColorHexContrast against white
Yellow#FFFF001.07:1
Cyan#00FFFF1.25:1
Green#00FF001.37:1
Magenta#FF00FF3.14:1
Red#FF00004.00:1
Blue#0000FF8.59:1

Every one of these has the same HSL lightness, yet yellow is almost as light as white, and blue is very dark. That is because the eye is far more sensitive to green light than to blue, and the WCAG luminance formula weights the channels accordingly.

The consequences for your work are practical:

  1. Don't assume equal lightness means equal brightness. A "50% lightness" yellow and a "50% lightness" blue will not feel balanced in an interface.
  2. Don't pick text colors by lightness alone. Measure the contrast ratio for each pair.
  3. When building a scale for several hues, such as chart colors, adjust lightness per hue so they look equally bright, instead of using one lightness value for all of them.

HSL and HSV

Many color pickers, including the one on this site, show a square with saturation along one side and brightness along the other. That square is based on a close relative of HSL called HSV (hue, saturation, value). In HSV, "value" is simply the largest channel, so the top edge of the square holds the pure, bright colors, and the bottom edge is black. HSL's lightness instead puts white at the top and black at the bottom, with the pure colors at the middle. The two describe the same colors with different axes. The picker shows you the HSL value for whatever you pick, so you can still read off lightness and saturation.

What about OKLCH?

If you want lightness that actually matches perception, there are newer color spaces designed for it. One, OKLCH, is available in current browsers as the oklch() CSS function. In it, equal lightness values look similarly bright across hues, which makes scales more even and contrast easier to predict. It is worth exploring for design systems where you generate many scales. For everyday work, HSL remains the simplest and the best supported option, and any value you design can always be converted to hex for tools that don't understand newer syntax. Check a browser support table before relying on oklch() in production.

A workflow you can reuse

  1. Convert your brand hex to HSL with the hex to HSL converter.
  2. Write the hue and saturation as CSS variables.
  3. Create lightness steps for backgrounds, borders, hover, pressed and text.
  4. Lower saturation at the extremes.
  5. Check each text pair for contrast.
  6. Convert the final values back to hex if your tools need them, using the HSL to hex converter.
  7. Keep the hex codes as the source of truth.

That last step matters. HSL is normally shown in whole numbers, so converting back and forth can drift by one step. For example, #1E90FF converts to hsl(210, 100%, 56%), which converts back to #1F8FFF. The difference is invisible, but if you pass colors around repeatedly it can accumulate. Treat HSL as a tool for adjusting, and hex as the record.

Common mistakes

Frequently asked questions

What is the difference between HSL and RGB?

They describe the same screen colors. RGB gives red, green and blue amounts, and HSL gives a hue angle, a saturation and a lightness. HSL is easier to adjust, and RGB is easier to compute with.

How do I make a color lighter in HSL?

Raise the lightness percentage and leave hue and saturation alone. To keep the result from looking washed out, reduce saturation slightly as you go.

Is 50% lightness the same as medium brightness?

It is the point where the color is at its purest, but how bright it looks depends heavily on the hue. Yellow at 50% is very bright, and blue at 50% is quite dark.

Does HSL work in every browser?

Yes. hsl() has been supported by all major browsers for many years, in both the comma and the space-separated forms.

Can I use HSL in design tools?

Most design tools accept HSL or let you switch the color picker to it. Hex is still the most portable format between tools.

Try it yourself

More guides