const class gfx::Color
sys::Obj gfx::Color : gfx::Brush
Models an ARGB color (alpha, red, green, blue). Color is also a solid
The alpha component from 0 to 255, where 255 is opaque and 0 is transparent.
const Int argb
The ARGB components masked together: bits 31-24 alpha; bits 16-23 red; bits 8-15 green; bits 0-7 blue.
The blue component from 0 to 255.
const static Color black := Color.make(0)
Constant for 0x00_00_00
const static Color blue := Color.make(255)
Constant for 0x00_00_ff
const static Color darkGray := Color.make(11119017)
Constant for 0xa9_a9_a9
Get a color which is a dark shade of this color. This decreases the brightness by the given percentage which is a float between 0.0 and 1.0.
Free any operating system resources used by this color. Dispose is required if this color has been used in an operation such as FWT onPaint which allocated a system resource to represent this instance.
Equality is based on
Parse color from string (see
toStr). If invalid and checked is true then throw ParseErr otherwise return null. The following formats are supported:
Color.fromStr("#8A0") Color.fromStr("#88AA00") Color.fromStr("#d088aa00")
The green component from 0 to 255.
const static Color gray := Color.make(8421504)
Constant for 0x80_80_80
const static Color green := Color.make(65280)
Constant for 0x00_ff_00
virtual override Int hash()
argbas the hash code.
Get a color which is a lighter shade of this color. This increases the brightness by the given percentage which is a float between 0.0 and 1.0.
Make a new instance with the ARGB components masked together: bits 31-24 alpha; bits 16-23 red; bits 8-15 green; bits 0-7 blue. If hasAlpha is false, then we assume the alpha bits are 0xFF.
Make a new instance with the ARGB individual components as integers between 0 and 255.
Construct a color using HSV model (hue, saturation, value), also known as HSB (hue, saturation, brightness):
Make a new instance with the RGB individual components as integers between 0 and 255.
const static Color orange := Color.make(16753920)
Constant for 0xff_a5_00
const static Color purple := Color.make(8388736)
Constant for 0x80_00_80
The red component from 0 to 255.
const static Color red := Color.make(16711680)
Constant for 0xff_00_00
Get the RGB bitmask without the alpha bits.
To a valid CSS color string.
virtual override Str toStr()
If the alpha component is 255, then format as
"#RRGGBB"hex string, otherwise format as
const static Color white := Color.make(16777215)
Constant for 0xff_ff_ff
const static Color yellow := Color.make(16776960)
Constant for 0xff_ff_00