Skip to main content

Module color

Module color 

Source

Structs§

Color
An sRGBA color, 8 bits per channel, with premultiplied alpha — the non-linear (“gamma”) values are the ones multiplied by the alpha, matching ecolor’s Color32 byte for byte so the two convert without a color shift.

Functions§

round_u8 🔒
Nearest-integer rounding as ecolor does it — the + 0.5 truncation, not f32::round, because the two disagree on ties and the byte has to match.