Skip to content
spazmodius edited this page Feb 16, 2011 · 2 revisions

Functions

hue

hue(color, [amount])

Returns or modifies the hue of a color

saturation

saturation(color, [amount])

Returns or modifies the saturation of a color

lightness

lightness(color, [amount])

Returns or modifies the brightness of a color

red

red(color, [amount])

Returns or modifies the red component of a color

green

green(color, [amount])

Returns or modifies the green component of a color

blue

blue(color, [amount])

Returns or modifies the blue component of a color

rgb

rgb(red, green, blue)

Returns a color with the specified red, green and blue components

rgba(r,g,b,a)

rgba(r,g,b,a)(red, green, blue, alpha)

Returns a color with the specified red, green, blue and alpha components

rgba(c,a)

rgba(c,a)(color, alpha)

Changes the alpha component of the specified color.

hsl

hsl(hue, saturation, lightness)

Returns a color with the specified hue, saturation and lightness components

hsla

hsla(hue, saturation, lightness, alpha)

Returns a color with the specified hue, saturation, lightness and alpha components

complement

complement(color)

Returns the complement of a color

contrast

contrast(color, [light=white], [dark=black], [threshold=0.5])

Returns either `light` or `dark` , depending on the lightness of `color`.

grayscale

grayscale(color)

Converts a color to grayscale

mix

mix(color1, color2, [weight = 50%])

Mix two colors together