Appearance
types.color
A wrapper class for interacting with colors
Properties
| Name | Description |
|---|---|
WHITE | type: color The white color (woah!!) |
BLACK | type: color The black color (woah!!) |
RED | type: color The red color (woah!!) |
GREEN | type: color The green color (woah!!) |
BLUE | type: color The blue color (woah!!) |
YELLOW | type: color The yellow color (woah!!) |
CYAN | type: color The cyan color (woah!!) |
MAGENTA | type: color The magenta color (woah!!) |
GRAY | type: color The gray color (woah!!) |
ORANGE | type: color The orange color (woah!!) |
TRANSPARENT | type: color The transparent color (woah!!) |
red | type: number The red color channel |
green | type: number The green color channel |
blue | type: number The blue color channel |
alpha | type: number The alpha color channel |
Functions
new(red : number, green : number, blue : number, opt_alpha : number): types.color
Creates a new color instance
- red (
number) The red color channel - green (
number) The green color channel - blue (
number) The blue color channel - opt_alpha (
number) (optional) The alpha color channel - returns (
types.color) A new color instance
with_alpha(alpha : number): types.color
Sets the color's alpha and returns it
- alpha (
number) The alpha from 0 to 255 - returns (
types.color)
