Sass color.is-powerless() Function

Beginner
⏱️ 12 min read
📚 Updated: Jul 2026
🎯 5 Examples
sass:color · Dart Sass 1.79+

What You’ll Learn

color.is-powerless() belongs to the built-in sass:color module. It answers: is this channel powerless—would changing it leave the color looking the same? This page covers the official hsl / hwb / lch / oklch rules, optional $space, how it differs from is-missing, the Dart Sass 1.79+ requirement, and five examples.

01

Concept

Powerless channels

02

Module

@use "sass:color"

03

Rules

hsl · hwb · lch

04

Space

Optional $space

05

Vs

is-missing()

06

Practice

5 examples

What Is color.is-powerless()?

Powerless means “this dial is connected, but turning it does nothing right now.” Classic case: a grey in HSL still stores a hue angle, but with saturation: 0% that hue cannot change the look. Official docs return whether $channel is powerless in $space.

  • color.is-powerless(hsl(180deg 0% 40%), "hue")true
  • color.is-powerless(hsl(180deg 0% 40%), "saturation")false
  • color.is-powerless(#999, "hue", $space: hsl)true
💡
Beginner tip

Greys are the teaching hero here. If there is no colorfulness (saturation / chroma), hue has no power—so hue-based mixins should check is-powerless first.

📝 Syntax

Load the color module, then pass a color, a quoted channel, and an optional space:

styles.scss
@use "sass:color";

// Dart Sass 1.79+
color.is-powerless($color, $channel, $space: null)

Parameters

ParameterTypeDescription
$colorColorThe color to inspect (required).
$channelQuoted stringChannel name, e.g. "hue", "saturation".
$spaceUnquoted stringOptional space to evaluate in (defaults to $color’s space), e.g. hsl, oklch.

Return value

TypeMeaning
Booleantrue if that channel is powerless in the chosen space; otherwise false.

📦 Loading sass:color

There is no separate global is-powerless() built-in. Use the module form on Dart Sass 1.79+.

styles.scss
// Recommended — namespaced (Dart Sass 1.79+)
@use "sass:color";
$p: color.is-powerless(hsl(180deg 0% 40%), "hue");

// Optional — bring members into the current namespace
@use "sass:color" as *;
$p: is-powerless(hsl(180deg 0% 40%), "hue");

// Optional — custom namespace
@use "sass:color" as c;
$p: c.is-powerless(hsl(180deg 0% 40%), "hue");
⚠️
Version gate

If Dart Sass reports Undefined function for color.is-powerless, upgrade to 1.79+.

🎨 When Is a Channel Powerless?

Official docs list these circumstances:

SpacePowerless channelCondition
hslhuesaturation is 0%
hwbhuewhiteness + blackness > 100%
lch / oklchhuechroma is 0%

📋 is-powerless vs is-missing

Both are boolean channel checks, but they answer different questions.

HelperQuestionTypical case
color.is-powerless()Would changing this channel change the look?Hue on a grey (sat/chroma is 0)
color.is-missing()Is this channel absent?rgb(100 none 200) green, or powerless channel represented as missing after conversion
💡
Often related

Converting a grey into lch can leave hue missing. Checking powerless in HSL/oklch catches the same “hue does not matter” idea before you rotate accents.

🛠 Compatibility

This is about Sass compilers, not browsers. The boolean is resolved at compile time—CSS never sees a color.is-powerless() call.

FeatureDart SassNotes
color.is-powerless() / $space1.79+Part of the modern color-spaces work
Related color.is-missing()1.79+Sibling boolean for absent channels
LibSass / Ruby SassNo modern module color-space API

⚡ Quick Reference

GoalCode
Import color@use "sass:color";
Grey HSL huecolor.is-powerless(hsl(180deg 0% 40%), "hue")true
Saturation still matterscolor.is-powerless(hsl(180deg 0% 40%), "saturation")false
Hex in HSL spacecolor.is-powerless(#999, "hue", $space: hsl)true
Branch in SCSSif(color.is-powerless($c, "hue"), …, …)

Examples Gallery

Examples target Dart Sass 1.79+. Open View Compiled CSS to see the booleans Sass emits.

📚 Getting Started

Official docs samples for HSL greys and hex-in-HSL.

Example 1 — HSL Grey: Hue Powerless, Saturation Not

Zero saturation makes hue powerless (official docs sample).

styles.scss
@use "sass:color";

@debug color.is-powerless(hsl(180deg 0% 40%), "hue");        // true
@debug color.is-powerless(hsl(180deg 0% 40%), "saturation"); // false

.flags {
  --hue: #{color.is-powerless(hsl(180deg 0% 40%), "hue")};
  --sat: #{color.is-powerless(hsl(180deg 0% 40%), "saturation")};
}

How It Works

With saturation at 0%, any hue looks the same grey—so hue is powerless. Saturation itself still controls whether colorfulness returns, so it is not powerless.

Example 2 — Hex Grey Checked in HSL Space

Pass $space: hsl so a hex is evaluated with HSL powerless rules.

styles.scss
@use "sass:color";

@debug color.is-powerless(#999, "hue", $space: hsl); // true

.hex {
  --hue-hsl: #{color.is-powerless(#999, "hue", $space: hsl)};
  --hue-pink: #{color.is-powerless(#b37399, "hue", $space: hsl)};
}

How It Works

#999 is a grey, so its HSL hue is powerless. #b37399 has saturation, so hue still matters.

📈 Practical Patterns

Oklch chroma, mixin guards, and powerless vs missing.

Example 3 — Oklch: Hue Powerless When Chroma Is 0%

Same idea in a modern polar space.

styles.scss
@use "sass:color";

.oklch {
  --grey-hue: #{color.is-powerless(oklch(50% 0% 120deg), "hue")};
  --vivid-hue: #{color.is-powerless(oklch(50% 0.15 120deg), "hue")};
}

How It Works

Official rule: in oklch / lch, hue is powerless when chroma is 0%. Add chroma and hue becomes meaningful again.

Example 4 — Guard Hue Rotations

Skip complement-style logic when hue is powerless.

styles.scss
@use "sass:color";

@mixin accent-note($c) {
  &::after {
    content: if(
      color.is-powerless($c, "hue", $space: hsl),
      "skip-hue",
      "use-hue"
    );
  }
}

.chip-grey {
  @include accent-note(#999);
}

.chip-pink {
  @include accent-note(#b37399);
}

How It Works

Grey tokens take the skip branch. Chromatic tokens keep hue-based accents. Real mixins might call color.complement() only in the use-hue path.

Example 5 — Powerless vs Missing Side by Side

Same grey story, two different boolean helpers.

styles.scss
@use "sass:color";

$grey-hsl: hsl(180deg 0% 40%);
$grey-lch: color.to-space(grey, lch);

.report {
  --powerless-hue: #{color.is-powerless($grey-hsl, "hue")};
  --missing-hue: #{color.is-missing($grey-lch, "hue")};
}

How It Works

In HSL the grey still has a hue value, but it is powerless. After converting grey to LCH, hue may be missing instead. Both flags warn you not to treat hue as a useful accent dial.

🚀 Real-World Use Cases

  • Accent mixins — skip hue rotates / complements on greys.
  • Palette audits — flag tokens where hue is stored but meaningless.
  • Design-system guards — refuse hue-based variants when sat/chroma is 0.
  • Space migrations — check hex greys with $space: hsl or oklch.
  • Teaching color models — show why greys still print a hue angle.

🧠 How Compilation Works

1

Write SCSS

Call color.is-powerless($color, "hue") after @use.

Source
2

Pick a space

Use $space, or default to the color’s own space.

Space
3

Apply powerless rules

Check sat/chroma/whiteness+blackness conditions for hue.

Rules
4

Plain CSS ships

Browsers see true/false or branched results—not a Sass call.

⚠️ Common Pitfalls

  • Old Dart Sasscolor.is-powerless needs 1.79+.
  • Unquoted channel names — use "hue", not bare hue.
  • Checking hex without $space — hex is rgb; pass $space: hsl (or oklch) to test hue powerlessness.
  • Confusing with missing — powerless ≠ absent; use both helpers when needed.
  • Rotating hue on greys — the math may run, but the visual result stays grey.

💡 Best Practices

✅ Do

  • Run Dart Sass 1.79+ before relying on is-powerless
  • Quote channel names; leave space names unquoted
  • Pass $space when inspecting hex/RGB colors for hue
  • Guard hue-based mixins for greys and near-greys
  • Prefer @use "sass:color"

❌ Don’t

  • Ship CI on older Dart Sass and expect this function to exist
  • Assume every stored hue angle is visually meaningful
  • Treat powerless and missing as identical without checking
  • Rely on LibSass / Ruby Sass
  • Build accent systems that only rotate hue on desaturated tokens

Key Takeaways

Knowledge Unlocked

Five things to remember about color.is-powerless()

Hue without colorfulness does nothing—check before you rotate, Dart Sass 1.79+.

5
Core concepts
📦 02

Needs

Dart Sass 1.79+

Version
🎨 03

Classic

sat 0% → hue

HSL
04

Modern

chroma 0% → hue

oklch
05

Sibling

is-missing()

Related

❓ Frequently Asked Questions

color.is-powerless($color, $channel, $space: null) returns true if that channel is powerless in the chosen space—changing it would not change how the color looks. Example: color.is-powerless(hsl(180deg 0% 40%), "hue") is true.
Official docs: in hsl when saturation is 0%; in hwb when whiteness + blackness is greater than 100%; in lch/oklch when chroma is 0%.
Missing means the channel is absent (for example CSS none). Powerless means the channel may still have a value, but it does not affect appearance—like hue on a grey.
color.is-powerless() and its $space argument need Dart Sass 1.79+. Older compilers report Undefined function.
Pass a quoted channel string such as "hue". Pass an unquoted space name such as hsl or oklch for $space.
No. Use the module form color.is-powerless() after @use "sass:color".
Did you know?

Official Sass docs call out a third powerless case besides HSL and LCH/OKLCH: in hwb, hue is powerless when whiteness + blackness is greater than 100%. That is the HWB way of saying the color is fully washed out, so hue cannot change what you see.

Conclusion

color.is-powerless() tells you when a channel—usually hue—cannot change how a color looks. Use it to guard accent mixins on greys, pass $space for hex tokens, and pair it with is-missing when converting spaces—on Dart Sass 1.79+.

Continue with color.mix(), color.is-missing(), or the CSS introduction.

Explore color.mix() Next

Blend two colors with weight using the sass:color module (optional $method on Dart Sass 1.79+).

Sass color.mix() →

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