Class Color
Hierarchy
- Color
Index
Constructors
constructor
Creates a new Sass color with the given red, green, blue, and alpha channels. The red, green, and blue channels must be integers between 0 and 255 (inclusive), and alpha must be between 0 and 1 (inclusive).
Parameters
r: number
g: number
b: number
Optional a: number
Returns Color
constructor
Creates a new Sass color with alpha, red, green, and blue channels taken from respective two-byte chunks of a hexidecimal number.
Parameters
argb: number
Returns Color
Methods
getA
Returns the alpha channel of the color as a number from 0 to 1.
Returns number
getB
Returns the blue channel of the color as an integer from 0 to 255.
Returns number
getG
Returns the green channel of the color as an integer from 0 to 255.
Returns number
getR
Returns the red channel of the color as an integer from 0 to 255.
Returns number
setA
Sets the alpha channel of the color. The value must be between 0 and 1 (inclusive).
Parameters
value: number
Returns void
setB
Sets the blue channel of the color. The value must be an integer between 0 and 255 (inclusive).
Parameters
value: number
Returns void
setG
Sets the green channel of the color. The value must be an integer between 0 and 255 (inclusive).
Parameters
value: number
Returns void
setR
Sets the red channel of the color. The value must be an integer between 0 and 255 (inclusive).
Parameters
value: number
Returns void
Sass's color type.