Favorites

lch() CSS Function

lch()
CSS FunctionThis function is supported by all modern browsers.
Updated 21st November 2026

The lch() function defines a color in the CIE LCH color space by lightness, chroma and hue.

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.

Description

The lch() CSS function defines a color in the CIE LCH color space using three components: lightness (L), chroma (C) and hue (H). LCH is the cylindrical form of the lab() color space. It is designed around how people perceive color, so changing one component produces a predictable visual change: raising lightness makes a color look lighter by a consistent amount whatever its hue, which is not true of hsl().

Lightness runs from 0 (black) to 100 (white), or 0% to 100%. Chroma is the amount of color, from 0 (gray) upwards; in practice values rarely go above about 150, and 100% equals 150. Hue is an angle around the color wheel, written as a number of degrees or with an angle unit. Because LCH can describe colors outside sRGB, browsers display the closest color the screen supports. An optional alpha value can be added after a slash.

.primary {
  background-color: lch(55% 70 265);   /* a strong blue */
}

/* Same lightness and chroma, different hues: a balanced palette */
.tag-red    { background-color: lch(60% 60 30); }
.tag-green  { background-color: lch(60% 60 140); }
.tag-purple { background-color: lch(60% 60 300); }

/* Relative color: a lighter version of a variable */
.primary:hover {
  background-color: lch(from var(--brand) calc(l + 15) c h);
}

Because the lightness is perceptually uniform, lch() is a good choice for building color scales and checking contrast. For more even hue behaviour, especially in blues, consider the related oklch() function.

Interactive Demo

Colour swatch
Demo Code
HTML Code
<div class="demo-checker">
	<div class="demo-element">Colour swatch</div>
</div>
CSS Code
.demo-checker {
	width: 296px;
	padding: 18px;
	box-sizing: border-box;
	background: repeating-conic-gradient(#ddd 0 25%, #fff 0 50%) 0 0 / 20px 20px;
}
.demo-element {
	width: 260px;
	padding: 18px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: bold;
	color: #fff;
	text-shadow: 0 1px 2px rgb(0 0 0 / 40%);
	background-color: lch(55 75 355);
}

Syntax

lch() = lch( [ from <color> ]? [ <percentage> | <number> | none ]
[ <percentage> | <number> | none ]
[ <hue> | none ]
[ / [ <alpha-value> | none ] ]? )

Values

  • L (lightness)A <number> from 0 to 100 or a <percentage> from 0% to 100%. 0 is black and 100 is white.
  • C (chroma)A <number> or <percentage> for the amount of color. 0 is gray; 100% equals 150. Values are theoretically unbounded but rarely exceed 230.
  • H (hue)A <hue> (number of degrees or <angle>) giving the position on the color wheel.
  • alphaOptional. An <alpha-value> after a slash (/) from 0 to 1, or a percentage.

Example

<div class="wrap">
<h1>CSS lch() examples</h1>
<div class="grid">
<div class="card">
<div class="sw l40"></div>
<div class="label">lch(40% 60 265)</div>
</div>
<div class="card">
<div class="sw l55"></div>
<div class="label">lch(55% 60 265)</div>
</div>
<div class="card">
<div class="sw l70"></div>
<div class="label">lch(70% 60 265)</div>
</div>
<div class="card">
<div class="sw h30"></div>
<div class="label">lch(60% 60 30)</div>
</div>
<div class="card">
<div class="sw h140"></div>
<div class="label">lch(60% 60 140)</div>
</div>
<div class="card">
<div class="sw h300"></div>
<div class="label">lch(60% 60 300)</div>
</div>
</div>
<p class="note">The bottom row keeps the same lightness and chroma, so the colors look equally light.</p>
</div>
/* Base demo layout */
* { box-sizing: border-box; }

body {
margin: 24px;
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
background: #f5f7fb;
color: #102a43;
}

.wrap {
max-width: 860px;
margin: 0 auto;
}

h1 {
font-size: 20px;
margin: 0 0 16px;
}

.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 16px;
}

.card {
background: #fff;
border-radius: 12px;
padding: 16px;
box-shadow: 0 6px 18px rgba(16, 42, 67, 0.08);
}

.label {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
font-size: 12px;
color: #486581;
margin-top: 10px;
word-break: break-word;
}

.note {
font-size: 13px;
color: #486581;
margin-top: 14px;
}

/* lch() examples */
.sw {
height: 90px;
border-radius: 8px;
border: 1px solid rgba(16, 42, 67, 0.08);
}

.l40 { background: lch(40% 60 265); }
.l55 { background: lch(55% 60 265); }
.l70 { background: lch(70% 60 265); }
.h30 { background: lch(60% 60 30); }
.h140 { background: lch(60% 60 140); }
.h300 { background: lch(60% 60 300); }
Open in editor

Browser Support

The following information will show you the current browser support for the CSS lch() function. Hover over a browser icon to see the version that first introduced support for this CSS function.

This function is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.