Module color

Source

Structsยง

Color
An RGBA color value, holding four floating point components.
ColorU8
A 32-bit RGBA color value.
PremultipliedColor
A premultiplied RGBA color value, holding four floating point components.
PremultipliedColorU8
A 32-bit premultiplied RGBA color value.

Constantsยง

ALPHA_OPAQUE
Represents fully opaque Alpha value.
ALPHA_TRANSPARENT
Represents fully transparent Alpha value.
ALPHA_U8_OPAQUE
Represents fully opaque AlphaU8 value.
ALPHA_U8_TRANSPARENT
Represents fully transparent AlphaU8 value.
NV_ONE ๐Ÿ”’
NV_ZERO ๐Ÿ”’

Functionsยง

color_f32_to_u8 ๐Ÿ”’
premultiply_u8
Return a*b/255, rounding any fractional bits.

Type Aliasesยง

AlphaU8
8-bit type for an alpha value. 255 is 100% opaque, zero is 100% transparent.