color.scale()fluidly scales one or more channel properties of a color. Each keyword is a percent from -100% to 100%: positive moves toward the channel’s maximum, negative toward its minimum. Load it with @use "sass:color". Global alias: scale-color().
Example mental model: $lightness: 50% makes a color 50% closer to maximum lightness without jumping fully white. Official docs prefer scale over fixed helpers like lighten / darken / saturate / opacify when you want relative change.
By default it scales in the color’s own space. Pass $space (Dart Sass 1.79+) to scale in another space; the returned color still stays in the original space.
Do not mix channel families.
For legacy colors, do not scale RGB and HSL (or HWB) channels in the same call. Pass $space explicitly when you can.
Relative writer: scale toward min/max by a percent of remaining room.
Preferred over lighten / darken / saturate / opacify for “% more” intents.
Use adjust for fixed steps; change for absolute values.
$space (1.79+) scales in another space while keeping the original space.
One line: when you mean “a bit lighter / punchier / more opaque,” reach for color.scale first.
Practice
Compile Notes
Practical checklist:
checklist.txt
1. @use "sass:color"
2. Prefer color.scale for relative theme tweaks
3. Keep keyword args between -100% and 100%
4. Do not mix RGB + HSL/HWB keywords on legacy colors
5. Pass $space on Dart Sass 1.79+ when scaling modern channels
Frequently Asked Questions
color.scale($color, ...) fluidly scales one or more channel properties toward their maximum or minimum by a percentage. Example: color.scale(#6b717f, $red: 15%) moves red 15% of the way toward its maximum.
scale moves a percentage of the remaining room toward a bound. adjust adds or subtracts fixed amounts. change sets channels to absolute new values.
Each keyword argument must be a number between -100% and 100% (inclusive). Positive values move toward the channel maximum; negative values move toward the minimum.
Add @use "sass:color"; then call color.scale($brand, $lightness: 20%) or other channel keywords. Prefer the module form. The global alias is scale-color().
On Dart Sass 1.79+, $space lets you scale channels in another color space (for example oklch) while still returning a color in $color’s original space.
The module form needs Dart Sass with @use (about 1.23+). $whiteness/$blackness need 1.28+. $space, $chroma, and xyz channels need 1.79+. LibSass/Ruby Sass may expose scale-color() but lack the modern module API.