Sass red() Function

Last Updated:

Sass red() Function

The red() function returns the red channel of a given color as a number between 0 and 255.

Example

SASS TO CSS CONVERTER
//Check your console @debug red(#e1d7d2); // 225 @debug red(white); // 255 @debug red(black); // 0

Syntax

red($color)

Parameter Value

ValueTypeExplanation
$color Required Specifies a color.

Return Value

ValueExplanation
Number Returns the red channel of $color as a number between 0 and 255.

Share this Page

Meet the Author