Skip to main content

Module color

Module color 

Source
Expand description

Color types and sRGB utilities.

Structs§

ParseColorError
Error returned when parsing a hex color string fails.
Rgba
An sRGB color with alpha, stored as four u8 components.

Functions§

composite_over
layer composited over base: source-over with straight (not premultiplied) alpha in sRGB, each colour [r, g, b, a] in 0.0..=1.0 as Rgba::to_f32_array gives it.