Sass opacify() Function

Last Updated:

Sass opacify() Function

The opacify() function makes a given color more opaque.

Example

SASS TO CSS CONVERTER
.foo{ color: opacify(#fff, 0.5); }

Syntax

opacify($color, $amount)

Parameter Value

ValueTypeExplanation
$color Required Specifies a color.
$amount Required Increases the alpha channel of $color by that amount. The $amount must be a number between 0 and 1 (both are inclusive)

Return Value

ValueExplanation
color Returns the opacified color.

Share this Page

Meet the Author