class openfl.canvas.Color
Available on all platforms
Class Fields
static function colorByName(name:String):Color
Gets a color by a known name.
| name | The name of the color. This must be the same as any one of the function names listed as static functions. Names are case-sensitive. |
| returns | Returns a |
static function colorFromHex(hex:String):Color
Converts the hexadecimal equivalent from a string as a Color.
| hex | The string value that represents a hexadecimal value. If the alpha value is excluded, the
generated alpha value defaults to 0xFF, else the included value is extracted from the given
|
| returns | Returns a |
Instance Fields
Returns only the alpha value extracted from valueWithAlpha as a Float percentage from 0-1.
function new(?red:Int = 0, ?green:Int = 0, ?blue:Int = 0, ?alpha:Int = 255):Void
Creates a Color type with the given values.
| red | The |
| green | The |
| blue | The |
| alpha | The |