Sass
CSS preprocessor

Sass desaturate() Function

Beginner
⏱️ 12 min read
📚 Updated: Jul 2026
🎯 5 Examples
Deprecated
Global · Dart Sass

What You’ll Learn

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

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.

  • desaturate(#036, 20%)#0a335c (saturation 100% → 80%)
  • desaturate(#f2ece4, 20%)#eeebe8 (saturation 35% → 15%)
  • desaturate(#d2e1dd, 30%)#dadada (saturation 20% → 0% gray)
💡
Beginner tip

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().

📝 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

ParameterTypeDescription
$colorColorMust be in a legacy color space (rgb, hsl, or hwb).
$amountNumber %How much to subtract from HSL saturation, between 0% and 100% (inclusive).

Return value

TypeMeaning
ColorA less saturated color (may clamp to gray when saturation hits 0%).

📦 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.

📋 desaturate vs color.scale vs color.adjust

Official docs call out this trap with a soft mint that only has 20% saturation:

CallResultWhy
desaturate(#d2e1dd, 30%)#dadada (gray)Subtracts 30% saturation from 20% → clamps to 0%
color.scale(#d2e1dd, $saturation: -30%)#d4dfdcMoves 30% of the way toward minimum saturation
color.adjust(..., $saturation: -30%)Same fixed math as desaturateUse 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.

🛠 Compatibility

This is about Sass compilers, not browsers. Compiled CSS receives a finished color—no desaturate() call remains at runtime.

FeatureDart SassNotes
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 SassGlobal likelyLack modern module / $space APIs

⚡ Quick Reference

GoalCode
Desaturate 20% (legacy)desaturate(#036, 20%)#0a335c
Soft creamdesaturate(#f2ece4, 20%)#eeebe8
Gray trapdesaturate(#d2e1dd, 30%)#dadada
Relative desaturatecolor.scale(#6b717f, $saturation: -30%)#6e727c
Same math as desaturatecolor.adjust($c, $saturation: -20%, $space: hsl)
Full mutecolor.grayscale($c)

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.

Example 1 — Saturation 100% → 80% (Official Docs)

A deep navy softens by a fixed 20% saturation.

styles.scss
// Saturation 100% becomes 80%.
@debug desaturate(#036, 20%); // #0a335c

.button {
  background: #036;
  &.muted {
    background: desaturate(#036, 20%);
  }
}

How It Works

Sass subtracts 20% from HSL saturation and emits a finished hex. Fine when the color is very saturated—risky when saturation is already low.

Example 2 — Cream Softened by 20% (Official Docs)

Saturation 35% becomes 15%.

styles.scss
// Saturation 35% becomes 15%.
@debug desaturate(#f2ece4, 20%); // #eeebe8

.card {
  --surface: #f2ece4;
  --quiet: #{desaturate(#f2ece4, 20%)};
}

How It Works

A modest fixed step turns a warm cream slightly cooler/grayer. In new code, try color.scale(#f2ece4, $saturation: -20%) and compare the look.

📈 Practical Patterns

The gray trap, preferred scale, and adjust migration.

Example 3 — Low Saturation + Large Amount → Gray (Official Docs)

Saturation 20% minus 30% clamps to gray.

styles.scss
// #d2e1dd has saturation 20%, so when desaturate() subtracts 30% it just
// returns gray.
@debug desaturate(#d2e1dd, 30%); // #dadada

.soft {
  color: desaturate(#d2e1dd, 30%);
}

How It Works

This is the classic reason official docs discourage desaturate. You asked for “a bit quieter,” but fixed math wiped the hue out to gray.

Example 4 — Prefer color.scale() (Official Docs)

Relative desaturation keeps tint; compare the gray trap side by side.

styles.scss
@use "sass:color";

// scale() instead makes it 30% less saturated than it was originally.
@debug color.scale(#6b717f, $saturation: -30%); // #6e727c

.report {
  --desaturate: #{desaturate(#d2e1dd, 30%)};
  --scale-mint: #{color.scale(#d2e1dd, $saturation: -30%)};
  --scale-docs: #{color.scale(#6b717f, $saturation: -30%)};
}

How It Works

desaturate collapses the mint to gray; scale keeps a soft green-gray. Prefer scale in new SCSS.

Example 5 — Preserve Old Math with color.adjust()

Match desaturate(#036, 20%) exactly when migrating.

styles.scss
@use "sass:color";

// Prefer on Dart Sass 1.79+:
// color.adjust($c, $saturation: -20%, $space: hsl)

.tokens {
  --legacy: #{desaturate(#036, 20%)};
  --adjust: #{color.adjust(#036, $saturation: -20%)};
  --mauve: #{desaturate(#b37399, 25%)};
}

How It Works

--legacy and --adjust match, so you can swap calls without visual diffs. Still consider scale when you redesign muted states.

🚀 Real-World Use Cases

  • Reading legacy SCSS — recognize desaturate() in older muted UI themes.
  • Safe migrations — swap to color.adjust for identical output, or scale for better UX.
  • Teaching HSL — show fixed saturation steps vs relative scaling.
  • Audit traps — find desaturate on already-soft colors that collapse to gray.
  • Pairing with saturate / grayscale — migrate related helpers in the same pass—see also saturate().

🧠 How Compilation Works

1

Write SCSS

Call desaturate($c, 20%) or migrate to scale / adjust.

Source
2

Read HSL saturation

Sass works in HSL for this legacy helper on rgb/hsl/hwb colors.

HSL
3

Subtract $amount

Saturation drops by a fixed percent; may clamp at 0% (gray).

Desaturate
4

Finished CSS color

Browsers see hex / gray—not a Sass function call.

⚠️ Common Pitfalls

  • Using it in new code — prefer color.scale (or adjust for same math).
  • Expecting color.desaturate() — that name does not exist in sass:color.
  • Soft colors + large amounts — easy to clamp to gray unexpectedly.
  • Modern color spaces$color must be legacy for global desaturate.
  • Assuming “30% less saturated” means scaledesaturate is fixed subtraction, not relative.

💡 Best Practices

✅ Do

  • Use color.scale($c, $saturation: -$n) for relative desaturation
  • Use color.adjust(..., $saturation: -$n, $space: hsl) when matching old desaturate
  • Audit low-saturation brands before applying large amounts
  • Consider color.grayscale() when you want a full mute
  • Document muted-token recipes with the modern API

❌ Don’t

  • Add new desaturate() calls in greenfield projects
  • Look for color.desaturate in the module
  • Pass modern oklch colors into global desaturate
  • Expect the browser to re-run Sass at runtime
  • Assume fixed saturation steps feel “30% quieter”

Key Takeaways

Knowledge Unlocked

Five things to remember about desaturate()

Deprecated fixed saturation subtractor—prefer scale.

5
Core concepts
⚠️ 02

Status

Deprecated

Docs
🎨 03

Does

subtract saturation

Fixed
📦 04

Module?

No color.desaturate

Global
05

Replace

scale or adjust

Migrate

❓ Frequently Asked Questions

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.

Conclusion

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.

Continue with color.green(), saturate(), color.scale(), or color.adjust().

Next: color.green()

You learned deprecated desaturate()—next, read the RGB green channel with color.green().

color.green() →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful