Sass scale-color() Function

You are Here:

Sass scale-color Function

The scale-color() function fluidly scales one or more properties of a given color.

Example

SASS TO CSS CONVERTER
.foo{ color: scale-color(#6b717f, $red: 15%); color: scale-color(#d2e1dd, $lightness: -10%, $saturation: 10%); }

Syntax

scale-color($color, $red, $green, $blue, $saturation, $lightness, $alpha)

Parameter Value

ValueTypeExplanation
$colorRequiredSpecifies a color.
$redOptionalSpecifies red channel in RGB value. The arguments must be between -100% and 100% (both are inclusive).
$greenOptionalSpecifies green channel in RGB value. The arguments must be between -100% and 100% (both are inclusive).
$blueOptionalSpecifies blue channel in RGB value. The arguments must be between -100% and 100% (both are inclusive).
$saturationOptionalSpecifies the intensity of color. The arguments must be between -100% and 100% (both are inclusive).
$lightnessOptionalSpecifies the tone of the color. The arguments must be between -100% and 100% (both are inclusive).
$alphaOptionalSpecifies the degree of transparency of a color. The arguments must be between -1 and 1 (both are inclusive).

Return Value

ValueExplanation
colorReturns the scaled $color

Reminder

Hi Developers, we almost covered 99.1% of Sass Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in Sass.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author