desaturate() is a global Sass helper documented in the sass:color module page (Deprecated Functions). It makes a legacy color less saturated by decreasing HSL saturation by $amount at compile time. This page covers the fixed-amount trap, why the module system skipped it, how it differs from color.scale(), migration to color.adjust(), and five compiled examples.
01
Concept
Subtract HSL saturation
02
Status
Deprecated global
03
$amount
0% … 100%
04
Prefer
color.scale()
05
Same math
color.adjust()
06
Practice
5 examples
Concept
What Is desaturate()?
Desaturate means “push this color toward gray by lowering saturation.” Official docs: it decreases the HSL saturation of $color by $amount (0%–100%). Hue and lightness stay related; only saturation moves down by a fixed chunk.
Fixed subtraction is like draining 30 units of color no matter how colorful you started. A soft pastel can hit gray immediately. Relative scaling is like “lose 30% of the saturation you still have”—that is color.scale. For a full mute to gray, see also color.grayscale().
Foundation
📝 Syntax
Call the global function with a legacy color and a percentage:
styles.scss
// Deprecated global (legacy colors only)
desaturate($color, $amount)
// Preferred — relative desaturation
@use "sass:color";
color.scale($color, $saturation: -$amount)
// Same fixed math as desaturate (Dart Sass 1.79+ with $space)
color.adjust($color, $saturation: -$amount, $space: hsl)
Parameters
Parameter
Type
Description
$color
Color
Must be in a legacy color space (rgb, hsl, or hwb).
$amount
Number %
How much to subtract from HSL saturation, between 0% and 100% (inclusive).
Return value
Type
Meaning
Color
A less saturated color (may clamp to gray when saturation hits 0%).
Modules
📦 Why There Is No color.desaturate()
Official docs: because desaturate() is usually not the best way to make a color less saturated, it is not included in the new module system. You will not find color.desaturate after @use "sass:color".
styles.scss
// Old (deprecated global)
$muted: desaturate(#036, 20%);
@use "sass:color";
// Same fixed subtraction as desaturate
$muted: color.adjust(#036, $saturation: -20%); // works on older Dart Sass too
// Official form (Dart Sass 1.79+):
// color.adjust(#036, $saturation: -20%, $space: hsl)
// Usually better — 20% less saturated relative to the original
$muted: color.scale(#036, $saturation: -20%);
⚠️
Version note for $space
Official migration uses $space: hsl, which needs Dart Sass 1.79+. On older compilers, color.adjust($c, $saturation: -$amount) still matches desaturate for typical hex/RGB colors.
Compare
📋 desaturate vs color.scale vs color.adjust
Official docs call out this trap with a soft mint that only has 20% saturation:
Call
Result
Why
desaturate(#d2e1dd, 30%)
#dadada (gray)
Subtracts 30% saturation from 20% → clamps to 0%
color.scale(#d2e1dd, $saturation: -30%)
#d4dfdc
Moves 30% of the way toward minimum saturation
color.adjust(..., $saturation: -30%)
Same fixed math as desaturate
Use only when you need identical legacy behavior
💡
Official scale sample
Docs also show color.scale(#6b717f, $saturation: -30%) → #6e727c as the relative approach on a cool grey-blue.
Support
🛠 Compatibility
This is about Sass compilers, not browsers. Compiled CSS receives a finished color—no desaturate() call remains at runtime.
Feature
Dart Sass
Notes
Global desaturate()
Yes (deprecated)
Legacy colors only; omitted from sass:color
color.scale($saturation: …)
Yes (module)
Preferred relative desaturation
color.adjust(..., $space: hsl)
1.79+
Official same-math migration form
LibSass / Ruby Sass
Global likely
Lack modern module / $space APIs
Cheat Sheet
⚡ Quick Reference
Goal
Code
Desaturate 20% (legacy)
desaturate(#036, 20%) → #0a335c
Soft cream
desaturate(#f2ece4, 20%) → #eeebe8
Gray trap
desaturate(#d2e1dd, 30%) → #dadada
Relative desaturate
color.scale(#6b717f, $saturation: -30%) → #6e727c
Same math as desaturate
color.adjust($c, $saturation: -20%, $space: hsl)
Full mute
color.grayscale($c)
Hands-On
Examples Gallery
Examples use deprecated global desaturate() plus modern scale / adjust migrations. Open View Compiled CSS for verified output (matches official Sass docs samples).
📚 Getting Started
Official docs samples for everyday desaturate amounts.
desaturate($color, $amount) decreases a legacy color’s HSL saturation by $amount (0%–100%). Example: desaturate(#036, 20%) is #0a335c.
Yes. Official Sass docs list it under Deprecated Functions and omit it from the sass:color module. Prefer color.scale() for relative desaturation, or color.adjust($color, $saturation: -$amount, $space: hsl) to keep the old math.
Because desaturate() is usually not the best way to lower saturation, it is not included in the new module system. Use color.scale or color.adjust instead.
desaturate subtracts a fixed saturation amount (20% saturation − 30% becomes gray). color.scale($c, $saturation: -30%) makes the color 30% less saturated 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 subtraction: color.adjust($color, $saturation: -$amount, $space: hsl) on Dart Sass 1.79+. For better relative desaturation: color.scale($color, $saturation: -$amount).
Did you know?
Official Sass docs skip desaturate() in the module system on purpose: relative tools like color.scale() quiet colors more predictably across vivid and pastel seeds, so a fixed-saturation global became a legacy footgun rather than a best practice.
desaturate() is the classic global way to subtract HSL saturation on legacy colors. Treat it as deprecated documentation: prefer color.scale($color, $saturation: -$amount) for relative desaturation, or color.adjust when you need identical old math.