Class representing a color, based on Int. Provides a variety of methods for creating and converting colors.

Color's can be written as Ints. This means you can pass a hex value such as 0xff123456 to a function expecting a Color, and it will automatically become a Color object. Similarly, Colors may be treated as Ints.

Variables

A:FastFloat

Contains a float representing the alpha color component (more exactly the opacity component - a value of 0 is fully transparent).

Ab:Int

Contains a byte representing the alpha color component (more exactly the opacity component - a value of 0 is fully transparent).

B:FastFloat

Contains a float representing the blue color component.

Bb:Int

Contains a byte representing the blue color component.

G:FastFloat

Contains a float representing the green color component.

Gb:Int

Contains a byte representing the green color component.

R:FastFloat

Contains a float representing the red color component.

Rb:Int

Contains a byte representing the red color component.

value:Int

Return this Color instance as Int.

Static variables

staticBlack:Color

staticBlue:Color

staticCyan:Color

staticGreen:Color

staticPink:Color

staticRed:Color

staticWhite:Color

Static methods

staticfromBytes (r:Int, g:Int, b:Int, ?a:Int):Color

Creates a new Color object from components in the range 0 - 255.

staticfromFloats (r:FastFloat, g:FastFloat, b:FastFloat, ?a:FastFloat):Color

Creates a new Color object from components in the range 0 - 1.

staticfromString (value:String):Color

Creates a new Color object from #AARRGGBB string.

staticinline fromValue (value:Int):Color

Creates a new Color object from a packed 32 bit ARGB value.