Sass grayscale() Function

Last Updated:

Sass grayscale() Function

The grayscale() function returns a gray color with the same lightness as a given color.

Note: This is identical to change-color($color, $saturation: 0%) function.

Example

SASS TO CSS CONVERTER
.foo{ color: grayscale(#6b717f); color: grayscale(#d2e1dd); color: grayscale(#036); }

Syntax

grayscale($color)

Parameter Value

ValueTypeExplanation
$color Required Specifies a color

Return Value

ValueExplanation
color Returns a gray color with the same lightness as $color.

Share this Page

Meet the Author