Sass
CSS preprocessor

Sass lighten() Function

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

What You’ll Learn

lighten() is a global Sass helper documented in the sass:color module page (Deprecated Functions). It makes a legacy color lighter by increasing HSL lightness 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

Add HSL lightness

02

Status

Deprecated global

03

$amount

0% … 100%

04

Prefer

color.scale()

05

Same math

color.adjust()

06

Practice

5 examples

What Is lighten()?

Lighten means “push this color toward white by raising lightness.” Official docs: it increases the HSL lightness of $color by $amount (0%100%). Hue and saturation stay related; only lightness moves up by a fixed chunk.

  • lighten(#6b717f, 20%)#a1a5af (lightness 46% → 66%)
  • lighten(#036, 60%)#99ccff (lightness 20% → 80%)
  • lighten(#e1d7d2, 30%)white (lightness 85% → 100%)
💡
Beginner tip

Fixed addition is like taking 30 steps up a staircase no matter how tall you already are. A tall color (already light) can hit the ceiling (white). Relative scaling is like “go 30% of the way toward white from where you stand”—that is color.scale.

📝 Syntax

Call the global function with a legacy color and a percentage:

styles.scss
// Deprecated global (legacy colors only)
lighten($color, $amount)

// Preferred — relative lightening
@use "sass:color";
color.scale($color, $lightness: $amount)

// Same fixed math as lighten (Dart Sass 1.79+ with $space)
color.adjust($color, $lightness: $amount, $space: hsl)

Parameters

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

Return value

TypeMeaning
ColorA lighter color (may clamp to white when lightness hits 100%).

📦 Why There Is No color.lighten()

Official docs: because lighten() is usually not the best way to make a color lighter, it is not included in the new module system. You will not find color.lighten after @use "sass:color".

styles.scss
// Old (deprecated global)
$soft: lighten(#6b717f, 20%);

@use "sass:color";

// Same fixed addition as lighten
$soft: color.adjust(#6b717f, $lightness: 20%); // works on older Dart Sass too
// Official form (Dart Sass 1.79+):
// color.adjust(#6b717f, $lightness: 20%, $space: hsl)

// Usually better — 20% lighter relative to the original
$soft: color.scale(#6b717f, $lightness: 20%);
⚠️
Version note for $space

Official migration uses $space: hsl, which needs Dart Sass 1.79+. On older compilers, color.adjust($c, $lightness: $amount) still matches lighten for typical hex/RGB colors.

📋 lighten vs color.scale vs color.adjust

Official docs call out this trap with #e1d7d2 (already 85% lightness):

CallResultWhy
lighten(#e1d7d2, 30%)whiteAdds 30% lightness to 85% → clamps to 100%
color.scale(#e1d7d2, $lightness: 30%)#eae3e0Moves 30% of the way toward maximum lightness
color.adjust(..., $lightness: 30%)Same fixed math as lightenUse only when you need identical legacy behavior

🛠 Compatibility

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

FeatureDart SassNotes
Global lighten()Yes (deprecated)Legacy colors only; omitted from sass:color
color.scale($lightness: …)Yes (module)Preferred relative lightening
color.adjust(..., $space: hsl)1.79+Official same-math migration form
LibSass / Ruby SassGlobal likelyLack modern module / $space APIs

⚡ Quick Reference

GoalCode
Lighten 20% (legacy)lighten(#6b717f, 20%)#a1a5af
Lighten 60%lighten(#036, 60%)#99ccff
Overshoot traplighten(#e1d7d2, 30%)white
Relative lightencolor.scale(#e1d7d2, $lightness: 30%)#eae3e0
Same math as lightencolor.adjust($c, $lightness: 20%, $space: hsl)
Darken twindarken($c, $amount) (also deprecated)

Examples Gallery

Examples use deprecated global lighten() plus modern scale / adjust migrations. Open View Compiled CSS for verified output (matches official Sass docs samples).

📚 Getting Started

Official docs samples for everyday lighten amounts.

Example 1 — Lightness 46% → 66% (Official Docs)

A slate gray lightens by a fixed 20% lightness.

styles.scss
// Lightness 46% becomes 66%.
@debug lighten(#6b717f, 20%); // #a1a5af

.button {
  background: #6b717f;
  &:hover {
    background: lighten(#6b717f, 20%);
  }
}

How It Works

Sass adds 20% to HSL lightness and emits a finished hex. Fine for mid-tone colors with room to spare—risky when the color is already pale.

Example 2 — Navy Lightened by 60% (Official Docs)

Lightness 20% becomes 80%.

styles.scss
// Lightness 20% becomes 80%.
@debug lighten(#036, 60%); // #99ccff

.banner {
  --ink: #036;
  --sky: #{lighten(#036, 60%)};
}

How It Works

A large fixed step turns a deep navy into a soft sky blue. In new code, try color.scale(#036, $lightness: 60%) and compare the look.

📈 Practical Patterns

The white trap, preferred scale, and adjust migration.

Example 3 — Pale Color + Large Amount → White (Official Docs)

Lightness 85% plus 30% clamps to white.

styles.scss
// #e1d7d2 has lightness 85%, so when lighten() adds 30% it just returns white.
@debug lighten(#e1d7d2, 30%); // white

.pale {
  color: lighten(#e1d7d2, 30%);
}

How It Works

This is the classic reason official docs discourage lighten. You asked for “a bit lighter,” but fixed math wiped the tint out to pure white.

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

Same seed color, relative 30% lightening keeps a soft tint.

styles.scss
@use "sass:color";

// scale() instead makes it 30% lighter than it was originally.
@debug color.scale(#e1d7d2, $lightness: 30%); // #eae3e0

.pale {
  --lighten: #{lighten(#e1d7d2, 30%)};
  --scale: #{color.scale(#e1d7d2, $lightness: 30%)};
}

How It Works

Side-by-side: lighten collapses to white; scale keeps a usable soft taupe. Prefer scale in new SCSS.

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

Match lighten(#6b717f, 20%) exactly when migrating.

styles.scss
@use "sass:color";

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

.tokens {
  --legacy: #{lighten(#6b717f, 20%)};
  --adjust: #{color.adjust(#6b717f, $lightness: 20%)};
  --brand: #{lighten(#336699, 15%)};
}

How It Works

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

🚀 Real-World Use Cases

  • Reading legacy SCSS — recognize lighten() in older soft-hover themes.
  • Safe migrations — swap to color.adjust for identical output, or scale for better UX.
  • Teaching HSL — show fixed lightness steps vs relative scaling.
  • Audit traps — find lighten on already-pale brands that collapse to white.
  • Pairing with darken — both globals are deprecated twins; migrate together.

🧠 How Compilation Works

1

Write SCSS

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

Source
2

Read HSL lightness

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

HSL
3

Add $amount

Lightness rises by a fixed percent; may clamp at 100%.

Lighten
4

Finished CSS color

Browsers see hex / named white—not a Sass function call.

⚠️ Common Pitfalls

  • Using it in new code — prefer color.scale (or adjust for same math).
  • Expecting color.lighten() — that name does not exist in sass:color.
  • Pale colors + large amounts — easy to clamp to white unexpectedly.
  • Modern color spaces$color must be legacy for global lighten.
  • Assuming “30% lighter” means scalelighten is fixed addition, not relative.

💡 Best Practices

✅ Do

  • Use color.scale($c, $lightness: $n) for relative lightening
  • Use color.adjust(..., $lightness: $n, $space: hsl) when matching old lighten
  • Audit already-pale brands before applying large amounts
  • Migrate darken siblings in the same pass
  • Document hover/token recipes with the modern API

❌ Don’t

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

Key Takeaways

Knowledge Unlocked

Five things to remember about lighten()

Deprecated fixed lightness adder—prefer scale.

5
Core concepts
⚠️ 02

Status

Deprecated

Docs
🌞 03

Does

Adds fixed lightness

HSL
🔄 04

Prefer

color.scale()

Modern
05

Same math

color.adjust(…)

Migrate

❓ Frequently Asked Questions

lighten($color, $amount) increases a legacy color’s HSL lightness by $amount (0%–100%). Example: lighten(#6b717f, 20%) is #a1a5af; lighten(#036, 60%) is #99ccff; lighten(#e1d7d2, 30%) is white.
Yes. Official Sass docs list it under Deprecated Functions and omit it from the sass:color module. Prefer color.scale() for relative lightening, or color.adjust($color, $lightness: $amount, $space: hsl) to keep the old math.
Because lighten() is usually not the best way to make a color lighter, it is not included in the new module system. Use color.scale or color.adjust instead.
lighten adds a fixed lightness amount (85% lightness + 30% becomes white). color.scale($c, $lightness: 30%) makes the color 30% lighter 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 addition: color.adjust($color, $lightness: $amount, $space: hsl) on Dart Sass 1.79+. For better relative lightening: color.scale($color, $lightness: $amount).
Did you know?

Official Sass docs keep lighten() and darken() for compatibility, but neither lives in sass:color. The modern story is color.scale for relative steps and color.adjust when you must match the old fixed math exactly.

Conclusion

lighten() is the classic global way to add HSL lightness on legacy colors. Treat it as deprecated documentation: prefer color.scale($color, $lightness: $amount) for relative lightening, or color.adjust when you need identical old math.

Continue with color.lightness(), color.scale(), or darken().

Next: color.lightness()

You learned deprecated lighten()—next, read HSL lightness with color.lightness().

color.lightness() →

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