Extends Color
Constructors
Creates a CMYKColor with the supplied color component values. The color components have values between 0 and 1.
- Parameters:
- c: Number — the amount of cyan
- m: Number — the amount of magenta
- y: Number — the amount of yellow
- k: Number — the amount of black
- a: Number — the alpha value — optional, default: 1
- Returns:
- CMYKColor
Creates a CMYKColor using the values from the supplied array. The color components have values between 0 and 1.
Sample code:
var components = [1, 1, 0, 0.5];
var color = new CMYKColor(components);
print(color); // { cyan: 1.0, magenta: 1.0, yellow: 0.0, black: 0.5 }
- Parameters:
- components: Array of Number
- Returns:
- CMYKColor
Operators
Properties
Returns the color component values as an array.
Sample code:
var color = new CMYKColor(1, 1, 0, 0.5); print(color.components) // 1.0, 1.0, 0.0, 0.5, -1.0Read-only.
- Returns:
- Array of Number
A value between 0 and 1 that specifies the amount of cyan in the CMYK color.
- Returns:
- Number
A value between 0 and 1 that specifies the amount of magenta in the CMYK color.
- Returns:
- Number
A value between 0 and 1 that specifies the amount of yellow in the CMYK color.
- Returns:
- Number