Extends Color
Constructors
Creates a GrayColor with the supplied color component values. The color components have values between 0 and 1.
- Parameters:
- g: Number — The amount of gray
- a: Number — The alpha value — optional, default: 1
- Returns:
- GrayColor
Creates a GrayColor using the color component values from the supplied array. The color components have values between 0 and 1.
Sample code: var components = [1]; var color = new GrayColor(components); print(color); // { gray: 1.0 }
- Parameters:
- components: Array of Number
- Returns:
- GrayColor