# Why 50% HSL Lightness Looks Different Across Colors

> Yellow and blue can both have 50% HSL lightness and look far apart. Learn what HSL measures and how OKLCH helps you adjust a web color palette.

Published: 2026-10-16
Category: Perception
Canonical URL: https://versatilbox.com/blog/hsl-lightness-perceived-brightness/

Two colors with **50% HSL lightness can look dramatically different in lightness**. Pure sRGB yellow and pure sRGB blue both have that value, yet yellow appears much lighter. HSL calculates its lightness component from RGB channel values; that calculation does not give a perceptually uniform scale across hues.

This matters when you build a palette by changing only the hue. A set of badges can share the same saturation and lightness numbers while looking uneven on the page. OKLCH gives you a lightness coordinate that better reflects those visual differences.

## What Does HSL Lightness Actually Measure?

HSL describes an sRGB color through hue, saturation and lightness. In the usual percentage notation, the last component runs from 0% for black to 100% for white. [MDN's HSL reference](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value/hsl) explains the components and their CSS syntax.

For an RGB color whose channels are normalized to the range 0–1, HSL lightness is:

> HSL lightness = (largest channel + smallest channel) ÷ 2

Multiply that result by 100 to express it as a percentage. This is the calculation used in the [W3C sRGB-to-HSL algorithm](https://www.w3.org/TR/css-color-4/#rgb-to-hsl).

The formula looks at the channel extremes. It does not account for which channel provides the largest value. Yellow has normalized RGB channels of (1, 1, 0), while blue has (0, 0, 1). In both cases, the largest channel is 1 and the smallest is 0, giving a lightness of 0.5.

## Yellow and Blue at the Same HSL Lightness

These two CSS colors make the difference easy to see:

- Yellow: `hsl(60 100% 50%)`, equivalent to `#ffff00`.
- Blue: `hsl(240 100% 50%)`, equivalent to `#0000ff`.

<div class="bp-swatch">
  <div class="row">
    <span style="background:#ffff00"></span>
    <span style="background:#0000ff"></span>
  </div>
  <div class="labs">
    <span>Yellow · HSL L 50%</span>
    <span>Blue · HSL L 50%</span>
  </div>
</div>

Both colors also have 100% HSL saturation. Matching those two components still leaves a large visual difference. The [CSS Color 4 HSL section](https://www.w3.org/TR/css-color-4/#the-hsl-notation) uses this same yellow-and-blue comparison to explain the limitations of HSL lightness.

If you give several interface accents the same HSL values except for hue, inspect them together. The shared numbers alone cannot establish a consistent visual weight.

## How OKLCH Lightness Changes the Comparison

OKLCH separates lightness, chroma and hue. Its lightness coordinate comes from Oklab, a color space designed around perceptual relationships. [MDN's OKLCH documentation](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value/oklch) distinguishes this perceived lightness from the lightness component in HSL.

Convert the two swatches above and the values are approximately:

- Yellow: `oklch(0.968 0.211 109.77)`, with lightness **96.8%**.
- Blue: `oklch(0.452 0.313 264.05)`, with lightness **45.2%**.

These are the original colors expressed in another coordinate system. Their appearance has not been adjusted to produce the different numbers. The new lightness values describe the difference that HSL's shared 50% value obscures.

In CSS, an OKLCH lightness of `0.968` is equivalent to `96.8%`. That correspondence does **not** mean you can copy an HSL lightness percentage into OKLCH and preserve a color. The two coordinates have different definitions.

Chroma also differs from HSL saturation. An OKLCH chroma value of `0.211` is not a saturation setting of 21.1%. Convert the whole color before comparing its components.

## Use the Color Converter to Check a Palette

Paste `#ffff00` into the [color converter](/color-converter/) and compare its HSL and OKLCH outputs. Repeat with `#0000ff`. You will see the shared HSL lightness and the separated OKLCH values without needing to calculate the conversion yourself.

Try the same check on your actual brand colors. If one accent feels much heavier than another, their OKLCH lightness values can help explain why. Treat the numbers as a starting point for adjustment, then review the colors at the size and on the background where people will use them.

For a palette revision:

- Compare the existing colors before changing them. Record their hex values so you can return to the originals.
- Adjust OKLCH lightness toward the visual hierarchy you want. Supporting surfaces and prominent accents may need different targets.
- Check chroma as you adjust. Some lightness-and-chroma combinations fall outside the displayable gamut; reducing chroma can help bring them into range. The [W3C gamut mapping section](https://www.w3.org/TR/css-color-4/#gamut-mapping) explains this constraint.
- Review the result in the interface, including text and borders. Equal lightness values are useful for comparison, but they do not establish that every color suits the same role.

## Does Matching Lightness Guarantee Text Contrast?

No. A lightness coordinate describes one color; text contrast concerns a foreground and its background. HSL lightness percentages and OKLCH lightness differences are not WCAG contrast ratios.

After adjusting a palette, evaluate the actual text-and-background pairs. Our [WCAG contrast guide](/blog/wcag-contrast-without-math-panic/) explains the calculation and the targets for different uses.

HSL remains convenient for describing hue or making quick edits within a color family. When you compare lightness across different hues, use a perceptual coordinate such as OKLCH L and inspect the finished design. A shared 50% value is only useful once you know what that percentage measures.

## Related tool

- [Compare HSL and OKLCH on the same color](https://versatilbox.com/color-converter/): Paste a hex color into the converter and compare the two lightness values.
