Properties
A value between 0 and 1 that specifies the color's alpha value. All colors of the different subclasses support alpha values.
- Returns:
- Number
Returns the type of the color as a string.
Sample code:
var color = new RGBColor(1, 0, 0);
print(color.type); // 'rgb'
print(color.type == 'cmyk'); // false
color = color.convert('cmyk') // convert the color to a CMYKColor
print(color.type); // 'cmyk'
color.alpha = 0.5; // give the color an alpha value
print(color.type); // 'acmyk'
Read-only.
- Returns:
- String ('rgb', 'cmyk', 'gray', 'bitmap', 'argb', 'acmyk', 'agray', 'abitmap') — the color type
Functions
Checks if the color has an alpha value.
- Returns:
- Boolean — true if the color has an alpha value, false otherwise
Converts the color into another color space.
- Parameters:
- type: String — the conversion color type ('rgb', 'cmyk', 'gray', 'bitmap', 'argb', 'acmyk', 'agray', 'abitmap')
- Returns:
- Color — the converted color.