opacify($color, $amount) increases a legacy color’s alpha by a fixed amount between 0 and 1 (inclusive) and returns a new color. It is a global built-in — there is nocolor.opacify(). Official docs list it as an alias of fade-in().
Examples use deprecated global opacify() / fade-in() plus modern scale / adjust. Open View Compiled CSS for verified output (matches official Sass docs samples).
Example 1 — Alpha 0.5 → 0.7 (Official Docs)
A semi-transparent slate becomes more solid by a fixed 0.2 alpha.
Deprecated: fixed alpha addition on legacy colors (alias of fade-in).
Prefer color.scale for “percent more opaque.”
Use color.adjust(..., $alpha: $amount) when you must match old pixels.
No module form — there is no color.opacify().
One line: learn opacify to read legacy overlays; write scale (or adjust) in new code.
Migrate
Migrate Notes
Conceptual flow:
flow.txt
1. Find opacify($color, $amount) or fade-in($color, $amount)
2. Want "% more opaque"? → color.scale($color, $alpha: $percent)
3. Need same pixels? → color.adjust($color, $alpha: $amount)
4. @use "sass:color"
5. Delete the global opacify() / fade-in() call
Frequently Asked Questions
opacify($color, $amount) increases a legacy color’s alpha by $amount (0–1). Example: opacify(rgba(#6b717f, 0.5), 0.2) is rgba(107, 113, 127, 0.7); opacify(rgba(#036, 0.7), 0.3) is fully opaque #036.
Yes. Official Sass docs list opacify($color, $amount) and fade-in($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 opacity changes, or color.adjust($color, $alpha: $amount) to keep the old math.
Because opacify() is usually not the best way to make a color more opaque, it is not included in the new module system. Use color.scale or color.adjust instead.
opacify adds a fixed alpha amount (0.7 + 0.3 becomes fully opaque). color.scale($c, $alpha: 30%) makes the color 30% more opaque than it was, which is usually what designers want.
For the same fixed addition: color.adjust($color, $alpha: $amount). For better relative opacity: color.scale($color, $alpha: $percent). fade-in() migrates the same way.