Manipulate color with Sass functions

Updated . Posted . Visible to the public. Repeats.

Sass comes with many built-in functions to manipulate color Show archive.org snapshot . Some of the more interesting functions include:

adjust-hue($color, $degrees)
Changes the hue of a color.

lighten($color, $amount)
Makes a color lighter.

darken($color, $amount)
Makes a color darker.

saturate($color, $amount)
Makes a color more saturated.

desaturate($color, $amount)
Makes a color less saturated.

grayscale($color)
Converts a color to grayscale.

complement($color)
Returns the complement of a color.

invert($color)
Returns the inverse of a color.

Henning Koch
Last edit
Niklas Hasselmeyer
Keywords
colors, colours
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2011-06-15 13:22)