# lch()

> The `lch()` CSS function specifies a color using the LCH color space, which describes colors based on lightness, chroma and hue.

## How do I use the lch() color function in CSS?

The color function that defines colors using the LCH (Lightness, Chroma, Hue) color space. It's a perceptually uniform color model, meaning that changes in the LCH values produce consistent changes in color perception, making it ideal for accessible and consistent color design.

- Topic: Colors
- Type: function
- Browser support: Chrome 111+, Chrome Android 111+, Edge 111+, Firefox 113+, Firefox Android 113+, Safari 15+, Safari iOS 15+

## Example

Wrong:

```css
.tag {
  background: lch(0.7 40 250);
}
```

Right:

```css
.tag {
  background: lch(70% 40 250);
}
```

In `lch()` lightness runs from 0 to 100, so a value under 1 renders almost black.

## Common mistakes

- Writing lightness as a value under 1, which gives near-black.
- Reusing `hsl()` hue numbers, which point to different colors in `lch()`.

## Key points

- Lightness is a percentage or a number from 0 to 100, and hue is an angle in degrees.
- High chroma values that leave sRGB have a fallback declared first.
- Blue palettes use `oklch()`, since `lch()` blues shift toward purple as lightness changes.

## Interview questions

### What is the difference between lch() and oklch()?

Both use lightness, chroma and hue. `oklch()` is built on Oklab, which keeps hues steadier, and its lightness runs from 0 to 1 instead of 0 to 100.

### What is chroma in lch()?

Chroma is how vivid the color is, from 0 for gray upward. It has no fixed maximum, and very high values fall outside what screens can show.

## Related cards

- [oklch()](https://wonderium.dev/css/oklch.md)
- [lab()](https://wonderium.dev/css/lab.md)
- [hsl()](https://wonderium.dev/css/hsl.md)
- [color()](https://wonderium.dev/css/color.md)
- [Relative Colors](https://wonderium.dev/css/relative-colors.md)

---

- Level: [CSS](https://wonderium.dev/css.md)
- HTML version: https://wonderium.dev/css/lch
- Last updated: 2026-11-25
