std.color
32-bit rgba color
pub Color :: struct { r: u8, g: u8, b: u8, a: u8,}pub rgb :: fn(r: u8, g: u8, b: u8) -> Colorpub rgba :: fn(r: u8, g: u8, b: u8, a: u8) -> Colorwith_alpha
Section titled “with_alpha”pub with_alpha :: fn(c: Color, a: u8) -> Colorsame color, new alpha
pub gray :: fn(v: u8) -> Coloropaque gray
pub white :: fn() -> Colorpub black :: fn() -> Colorpub red :: fn() -> Colorpub green :: fn() -> Colorpub blue :: fn() -> Coloryellow
Section titled “yellow”pub yellow :: fn() -> Colororange
Section titled “orange”pub orange :: fn() -> Colorpurple
Section titled “purple”pub purple :: fn() -> Colorpub clear :: fn() -> Colorpub lerp :: fn(a: Color, b: Color, t: f32) -> Colorper-channel lerp; a at t=0, b at t=1
to_u32
Section titled “to_u32”pub to_u32 :: fn(c: Color) -> u32pack to 0xRRGGBBAA
from_u32
Section titled “from_u32”pub from_u32 :: fn(v: u32) -> Colorunpack from 0xRRGGBBAA