Because color.lightness() is redundant with color.channel(), migrate readers to the channel API in new code. Do not confuse this reader with the deprecated writer lighten().
Deprecated in favor of color.channel($c, "lightness").
Siblings:color.hue() and color.saturation().
Writers use scale / adjust — not this reader (and not new lighten).
One line: use color.lightness to understand old HSL reads — write new ones with color.channel.
Migrate
Migrate Notes
Practical checklist:
migrate.txt
1. Find color.lightness($c) / lightness($c) in legacy SCSS
2. Require Dart Sass 1.79+ for color.channel
3. Replace with color.channel($c, "lightness")
4. Add $space: hsl when reading non-legacy colors
5. Use scale / adjust when you need to change lightness
Frequently Asked Questions
color.lightness($color) returns the HSL lightness of a legacy color as a number between 0% and 100%. Example: color.lightness(#e1d7d2) is about 85.29%; color.lightness(#f2ece4) is about 92.16%; color.lightness(#dadbdf) is about 86.47%.
Yes. Official Sass docs list it under Deprecated Functions and say it is no longer recommended because it is redundant with color.channel($color, "lightness").
A number from 0% to 100% (with the % unit). It is still a Sass number—meta.type-of reports number.
Official docs require a legacy color space (rgb, hsl, or hwb). Convert first, or use color.channel($color, "lightness", $space: hsl) on Dart Sass 1.79+.
color.hue(), color.saturation(), and color.lightness() are sibling deprecated readers for the three HSL channels. Prefer color.channel with "hue", "saturation", or "lightness" in new code.
color.lightness() only reads the lightness percent. lighten() is a separate deprecated global that increases lightness and returns a new color. Prefer color.channel to read and color.scale / color.adjust to change.
Replace color.lightness($color) with color.channel($color, "lightness") after @use "sass:color" on Dart Sass 1.79+. Keep color.lightness only when maintaining older compilers or legacy SCSS.