Sass lightness() Function

Last Updated:

Sass lightness() Function

The lightness() function returns the HSL lightness of a given color as a number between 0% and 100%.

Example

SASS TO CSS CONVERTER
// Check your console @debug lightness(#e1d7d2); @debug lightness(#000000);

Syntax

lightness($color)

Parameter Value

ValueTypeExplanation
$color Required Specifies a color.

Return Value

ValueExplanation
Number Returns the HSL lightness of $color as a number between 0% and 100%.

Share this Page

Meet the Author