Sass
CSS preprocessor

Sass fade-out() Function

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

What You’ll Learn

fade-out() is a global Sass helper documented in the sass:color module page (Deprecated Functions). It makes a legacy color more transparent by decreasing alpha by $amount at compile time. This page covers the fixed-amount trap, the transparentize alias, why the module system skipped it, how it differs from color.scale(), migration to color.adjust(), and five compiled examples.

01

Concept

Subtract alpha 0–1

02

Status

Deprecated global

03

Alias

transparentize()

04

Prefer

color.scale()

05

Same math

color.adjust()

06

Practice

5 examples

What Is fade-out()?

Fade-out means “make this color more see-through.” Official docs: it decreases the alpha channel of $color by $amount (01). RGB (or HSL) stays the same; only transparency moves toward clear by a fixed chunk. It is the same helper as transparentize().

  • fade-out(rgba(#e1d7d2, 0.5), 0.4)rgba(225, 215, 210, 0.1)
  • transparentize(rgba(#6b717f, 0.5), 0.2)rgba(107, 113, 127, 0.3)
  • fade-out(rgba(#036, 0.3), 0.3)rgba(0, 51, 102, 0) (fully transparent)
💡
Beginner tip

Fixed subtraction is like draining the same cup of opacity from every glass. A glass that is already nearly empty (alpha 0.3) becomes invisible. Relative scaling is like “lose 30% of the opacity you still have”—that is color.scale. For the opposite direction, see fade-in().

📝 Syntax

Call the global function (or its alias) with a legacy color and an alpha step:

styles.scss
// Deprecated globals (legacy colors only) — aliases
fade-out($color, $amount)
transparentize($color, $amount)

// Preferred — relative transparency
@use "sass:color";
color.scale($color, $alpha: -$percent)

// Same fixed math as fade-out
color.adjust($color, $alpha: -$amount)

Parameters

ParameterTypeDescription
$colorColorMust be in a legacy color space (rgb, hsl, or hwb).
$amountNumberHow much to subtract from alpha, between 0 and 1 (inclusive).

Return value

TypeMeaning
ColorA more transparent color (may clamp to fully transparent when alpha hits 0).

📦 Why There Is No color.fade-out()

Official docs: because fade-out() / transparentize() is usually not the best way to make a color more transparent, it is not included in the new module system. You will not find color.fade-out or color.transparentize after @use "sass:color".

styles.scss
// Old (deprecated globals — same result)
$wash: fade-out(rgba(#e1d7d2, 0.5), 0.4);
$wash: transparentize(rgba(#e1d7d2, 0.5), 0.4);

@use "sass:color";

// Same fixed subtraction as fade-out
$wash: color.adjust(rgba(#e1d7d2, 0.5), $alpha: -0.4);

// Usually better — 40% more transparent relative to the original
$wash: color.scale(rgba(#e1d7d2, 0.5), $alpha: -40%);
⚠️
Migration note

Matching old fade-out math means subtracting alpha with color.adjust($c, $alpha: -$amount) (official docs also show $space: hsl on Dart Sass 1.79+). Prefer color.scale($c, $alpha: -$percent) when you redesign ghost buttons and overlay washes.

📋 fade-out vs color.scale vs color.adjust

Official docs call out this trap with rgba(#036, 0.3) (already mostly transparent):

CallResultWhy
fade-out(rgba(#036, 0.3), 0.3)rgba(0, 51, 102, 0)Subtracts 0.3 alpha from 0.3 → clamps to 0
color.scale(rgba(#036, 0.3), $alpha: -30%)rgba(0, 51, 102, 0.21)Moves 30% of the way toward full transparency
color.adjust(..., $alpha: -0.3)Same fixed math as fade-outUse only when you need identical legacy behavior

🛠 Compatibility

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

FeatureDart SassNotes
Global fade-out() / transparentize()Yes (deprecated)Legacy colors only; omitted from sass:color
color.scale($alpha: …)Yes (module)Preferred relative transparency change
color.adjust($alpha: …)Yes (module)Same fixed math as fade-out
LibSass / Ruby SassGlobals likelyLack modern module APIs

⚡ Quick Reference

GoalCode
fade-out 0.4 (legacy)fade-out(rgba(#e1d7d2, 0.5), 0.4)rgba(225, 215, 210, 0.1)
transparentize aliastransparentize(rgba(#6b717f, 0.5), 0.2)rgba(107, 113, 127, 0.3)
Overshoot trapfade-out(rgba(#036, 0.3), 0.3)rgba(0, 51, 102, 0)
Relative transparencycolor.scale(rgba(#036, 0.3), $alpha: -30%)rgba(0, 51, 102, 0.21)
Same math as fade-outcolor.adjust($c, $alpha: -0.4)
Opposite (more opaque)fade-in() / opacify() (also deprecated)

Examples Gallery

Examples lead with fade-out(), show the transparentize() alias, then modern scale / adjust migrations. Open View Compiled CSS for verified output (matches official Sass docs samples).

📚 Getting Started

Official docs samples for everyday fade-out amounts.

Example 1 — Alpha 0.5 → 0.1 (Official Docs)

A soft taupe wash becomes nearly invisible by a fixed 0.4 alpha.

styles.scss
@debug fade-out(rgba(#e1d7d2, 0.5), 0.4); // rgba(225, 215, 210, 0.1)

.card {
  background: rgba(#e1d7d2, 0.5);
  &.ghost {
    background: fade-out(rgba(#e1d7d2, 0.5), 0.4);
  }
}

How It Works

Sass subtracts 0.4 from alpha and emits a finished rgba(). Fine when there is room above 0—risky when the color is already mostly transparent.

Example 2 — transparentize() Alias (Official Docs)

Same API, different name: alpha 0.5 − 0.2 → 0.3.

styles.scss
@debug transparentize(rgba(#6b717f, 0.5), 0.2); // rgba(107, 113, 127, 0.3)

.overlay {
  --wash: #{rgba(#6b717f, 0.5)};
  --ghost: #{transparentize(rgba(#6b717f, 0.5), 0.2)};
}

How It Works

transparentize and fade-out are interchangeable. When you migrate, treat both names as the same deprecated step.

📈 Practical Patterns

The invisible trap, preferred scale, and adjust migration.

Example 3 — Low Alpha + Amount → Invisible (Official Docs)

Alpha 0.3 minus 0.3 clamps to fully transparent.

styles.scss
// rgba(#036, 0.3) has alpha 0.3, so when fade-out() subtracts 0.3 it
// returns a fully transparent color.
@debug fade-out(rgba(#036, 0.3), 0.3); // rgba(0, 51, 102, 0)

.deep {
  color: fade-out(rgba(#036, 0.3), 0.3);
}

How It Works

This is the classic reason official docs discourage fade-out. You asked for “a bit more transparent,” but fixed math wiped the color out to invisible.

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

Same seed color, relative −30% alpha keeps a usable translucent navy.

styles.scss
@use "sass:color";

// scale() instead makes it 30% more transparent than it was originally.
@debug color.scale(rgba(#036, 0.3), $alpha: -30%); // rgba(0, 51, 102, 0.21)

.deep {
  --fade-out: #{fade-out(rgba(#036, 0.3), 0.3)};
  --scale: #{color.scale(rgba(#036, 0.3), $alpha: -30%)};
}

How It Works

Side-by-side: fade-out collapses to invisible; scale keeps alpha near 0.21. Prefer scale in new SCSS.

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

Match fade-out(rgba(#e1d7d2, 0.5), 0.4) exactly when migrating.

styles.scss
@use "sass:color";

// Prefer on Dart Sass 1.79+:
// color.adjust($c, $alpha: -0.4, $space: hsl)

.tokens {
  --legacy: #{fade-out(rgba(#e1d7d2, 0.5), 0.4)};
  --adjust: #{color.adjust(rgba(#e1d7d2, 0.5), $alpha: -0.4)};
  --brand: #{fade-out(rgba(#336699, 0.8), 0.3)};
}

How It Works

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

🚀 Real-World Use Cases

  • Reading legacy SCSS — recognize fade-out() / transparentize() in older overlays.
  • Safe migrations — swap to color.adjust for identical output, or scale for better UX.
  • Teaching alpha — show fixed alpha steps vs relative scaling.
  • Audit traps — find fade-out on already-faint washes that snap to invisible.
  • Pairing with fade-in — both globals are deprecated twins; migrate together.

🧠 How Compilation Works

1

Write SCSS

Call fade-out($c, 0.4) or migrate to scale / adjust.

Source
2

Read alpha

Sass works on the alpha channel of legacy rgb/hsl/hwb colors.

Alpha
3

Subtract $amount

Alpha drops by a fixed step; may clamp at 0.

Fade-out
4

Finished CSS color

Browsers see rgba()—not a Sass function call.

⚠️ Common Pitfalls

  • Using it in new code — prefer color.scale (or adjust for same math).
  • Expecting color.fade-out() — that name does not exist in sass:color.
  • Low alpha + large amounts — easy to clamp to fully transparent unexpectedly.
  • Modern color spaces$color must be legacy for global fade-out.
  • Confusing with color.opacity() — that helper reads alpha; fade-out writes a new color.

💡 Best Practices

✅ Do

  • Use color.scale($c, $alpha: -$n) for relative transparency
  • Use color.adjust(..., $alpha: -$n) when matching old fade-out
  • Audit already-faint washes before applying large amounts
  • Migrate transparentize aliases in the same pass
  • Document overlay recipes with the modern API

❌ Don’t

  • Add new fade-out() / transparentize() calls in greenfield projects
  • Look for color.fade-out in the module
  • Pass modern oklch colors into global fade-out
  • Expect the browser to re-run Sass at runtime
  • Assume fixed alpha steps feel “30% more transparent”

Key Takeaways

Knowledge Unlocked

Five things to remember about fade-out()

Deprecated fixed alpha subtractor—prefer scale.

5
Core concepts
⚠️ 02

Status

Deprecated

Docs
🔄 03

Alias

transparentize()

Twin
📈 04

Prefer

color.scale()

Modern
05

Same math

color.adjust(…)

Migrate

❓ Frequently Asked Questions

fade-out($color, $amount) decreases a legacy color’s alpha by $amount (0–1). Example: fade-out(rgba(#e1d7d2, 0.5), 0.4) is rgba(225, 215, 210, 0.1); fade-out(rgba(#036, 0.3), 0.3) is fully transparent rgba(0, 51, 102, 0).
Yes. Official Sass docs list fade-out($color, $amount) and transparentize($color, $amount) as aliases that return the same color.
Yes. Official Sass docs list it under Deprecated Functions and omit it from the sass:color module. Prefer color.scale() for relative transparency, or color.adjust($color, $alpha: -$amount) to keep the old math.
Because fade-out() is usually not the best way to make a color more transparent, it is not included in the new module system. Use color.scale or color.adjust instead.
fade-out subtracts a fixed alpha amount (0.3 − 0.3 becomes fully transparent). color.scale($c, $alpha: -30%) makes the color 30% more transparent than it was, which is usually what designers want.
For the same fixed subtraction: color.adjust($color, $alpha: -$amount). For better relative transparency: color.scale($color, $alpha: -$percent). transparentize() migrates the same way.
Did you know?

Official Sass docs keep fade-out() and transparentize() as the same helper for compatibility, but neither lives in sass:color. The modern story is color.scale for relative transparency and color.adjust when you must match the old fixed math exactly.

Conclusion

fade-out() (alias transparentize()) is the classic global way to subtract alpha on legacy colors. Treat it as deprecated documentation: prefer color.scale($color, $alpha: -$percent) for relative transparency, or color.adjust when you need identical old math.

Continue with fade-in(), color.scale(), or CSS Introduction.

Explore CSS Next

You learned deprecated fade-out() and how to migrate—continue into CSS fundamentals.

CSS Introduction →

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