(rgba: Number, Number, Number, Number) → colour

A special version of (rgb:), this macro allows you to supply not just the red ®, green (g) and blue (b) values, but also the transparency (alpha, or a) percentage, which is a fractional value between 0 (fully transparent) and 1 (fully visible).

Anything drawn with a partially transparent colour will itself be partially transparent. You can then layer such elements to produce a few interesting visual effects.

Example usage:

(rgba: 178, 229, 178, 0.6) produces a 40% transparent faint green.


This macro takes the same range of number as the CSS rgba() function.

Giving alpha percentages higher than 1 or lower than 0 will cause an error.

See also:

(rgb:), (hsl:), (hsla:)