lighten($color, $amount) increases a legacy color’s HSL lightness by a fixed percentage (0%–100%) and returns a new color. It is a global built-in — there is nocolor.lighten().
Large fixed step turns deep navy into soft sky blue.
Custom property stores the light variant.
In new code, try color.scale(#036, $lightness: 60%).
Compare the look before locking tokens.
Example 3 — Pale Color + Large Amount → White (Official Docs)
Lightness 85% plus 30% clamps to white.
SCSS
// #e1d7d2 has lightness 85%, so when lighten() adds 30% it just returns white.
@debug lighten(#e1d7d2, 30%); // white
.pale {
color: lighten(#e1d7d2, 30%);
}
Compiled CSS
.pale {
color: white;
}
How It Works
#e1d7d2 lightness is 85%.
Add 30% → above 100% → white.
You asked for “a bit lighter” and wiped the tint out.
Classic reason official docs discourage lighten.
Example 4 — Prefer color.scale() (Official Docs)
Same seed color, relative 30% lightening keeps a soft tint.
SCSS
@use "sass:color";
// scale() instead makes it 30% lighter than it was originally.
@debug color.scale(#e1d7d2, $lightness: 30%); // #eae3e0
.pale {
--lighten: #{lighten(#e1d7d2, 30%)};
--scale: #{color.scale(#e1d7d2, $lightness: 30%)};
}
Compiled CSS
.pale {
--lighten: white;
--scale: #eae3e0;
}
How It Works
Side-by-side shows the trap vs the fix.
lighten collapses to white.
scale keeps usable soft taupe #eae3e0.
Prefer scale in new SCSS for soft hovers / surfaces.
Example 5 — Preserve Old Math with color.adjust()
Match lighten(#6b717f, 20%) exactly when migrating.
Deprecated: fixed HSL lightness addition on legacy colors.
Prefer color.scale for “percent lighter.”
Use color.adjust when you must match old pixels.
No module form — there is no color.lighten().
One line: learn lighten to read legacy SCSS; write scale (or adjust) in new code.
Migrate
Migrate Notes
Conceptual flow:
flow.txt
1. Find lighten($color, $amount)
2. Want "% lighter"? → color.scale($color, $lightness: $amount)
3. Need same pixels? → color.adjust($color, $lightness: $amount, $space: hsl)
4. @use "sass:color"
5. Delete the global lighten() call
Frequently Asked Questions
lighten($color, $amount) increases a legacy color’s HSL lightness by $amount (0%–100%). Example: lighten(#6b717f, 20%) is #a1a5af; lighten(#036, 60%) is #99ccff; lighten(#e1d7d2, 30%) is white.
Yes. Official Sass docs list it under Deprecated Functions and omit it from the sass:color module. Prefer color.scale() for relative lightening, or color.adjust($color, $lightness: $amount, $space: hsl) to keep the old math.
Because lighten() is usually not the best way to make a color lighter, it is not included in the new module system. Use color.scale or color.adjust instead.
lighten adds a fixed lightness amount (85% lightness + 30% becomes white). color.scale($c, $lightness: 30%) makes the color 30% lighter than it was, which is usually what designers want.
No for modern spaces. Official docs require a legacy color space (rgb, hsl, or hwb). Convert first, or use color.scale / color.adjust with an explicit $space.
For the same fixed addition: color.adjust($color, $lightness: $amount, $space: hsl) on Dart Sass 1.79+. For better relative lightening: color.scale($color, $lightness: $amount).