color.adjust() increases or decreases one or more channels of a color by fixed amounts and returns a new color. Load it with @use "sass:color". The global alias is adjust-color().
By default it adjusts channels in the color’s own space. Pass $space to adjust in another space (Dart Sass 1.79+). The result always stays in the original color’s space.
Official idea.
Add the keyword values to each channel. Example: color.adjust(#6b717f, $red: 15) → #7a717f.
Prefer over lighten / darken.
Legacy lighten() / darken() map to color.adjust(..., $lightness: …, $space: hsl). Prefer the module helper in new code.
Do not mix channel families.
For legacy colors, do not adjust RGB and HSL (or HWB) channels in the same call. Pass $space explicitly when you can.
Fixed steps:color.adjust adds or subtracts channel amounts.
Load@use "sass:color" and prefer the module name.
Replace lighten/darken with lightness adjustments (+ $space: hsl).
Relative %? Use scale. Absolute set? Use change.
One line:color.adjust is how modern Sass nudges a color by exact channel steps.
Compile
Compile Notes
Conceptual flow:
flow.txt
1. @use "sass:color"
2. Resolve $color into its color space
3. Add each keyword delta to the matching channel
4. Clamp channels that leave their native range
5. Return a new color in the original space for CSS
Frequently Asked Questions
color.adjust($color, ...) increases or decreases one or more channels by fixed amounts and returns a new color. Example: color.adjust(#6b717f, $red: 15) is #7a717f.
Add @use "sass:color"; then call color.adjust($color, $lightness: 10%) or other channel keywords. Prefer the module form in new SCSS.
adjust adds or subtracts fixed amounts. scale shifts channels fluidly by a percentage of the remaining room. change sets channels to absolute new values.
Yes. Official docs map lighten($color, $amount) to color.adjust($color, $lightness: $amount, $space: hsl) and darken to a negative lightness adjustment.
The global built-in is adjust-color(...). On sass:color the helper is color.adjust(). Prefer color.adjust() in new code.
Built-in modules with @use need Dart Sass (about 1.23+). $whiteness/$blackness need 1.28+. $space and more modern channels need 1.79+. LibSass and Ruby Sass do not load sass:color the same way.