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

staticinline read onlyBlack:Color = 0xff000000

staticinline read onlyBlue:Color = 0xff0000ff

staticinline read onlyCyan:Color = 0xff00ffff

staticinline read onlyGreen:Color = 0xff00ff00

staticinline read onlyMagenta:Color = 0xffff00ff

staticinline read onlyOrange:Color = 0xffffa500

staticinline read onlyPink:Color = 0xffffc0cb

staticinline read onlyPurple:Color = 0xff800080

staticinline read onlyRed:Color = 0xffff0000

staticinline read onlyTransparent:Color = 0x00000000

staticinline read onlyWhite:Color = 0xffffffff

staticinline read onlyYellow:Color = 0xffffff00

Static methods

staticfromBytes (r:Int, g:Int, b:Int, a:Int = 255):Color

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

staticfromFloats (r:FastFloat, g:FastFloat, b:FastFloat, a:FastFloat = 1):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.