A colour from a 0xRRGGBB number.
- value: the colour as
0xRRGGBB. - alpha: alpha, 0 to 1.
white := hex(0xFFFFFF);
assert(white.x == 1 && white.y == 1 && white.z == 1);
glass := hex(0x3B82F6, 0.5);
assert(glass.w == 0.5);hex :: (value: u32, alpha: float = 1) -> Color
A colour from a 0xRRGGBB number.
Parameters
- value: u32
- the colour as
0xRRGGBB. - alpha: float = 1
- alpha, 0 to 1.
Returns
white := hex(0xFFFFFF);
assert(white.x == 1 && white.y == 1 && white.z == 1);
glass := hex(0x3B82F6, 0.5);
assert(glass.w == 0.5);