Module vizia::vg::color_filters
Functionsยง
- Blends between the constant color (src) and input color (dst) based on the
BlendMode
. If the color space isNone
, the constant color is assumed to be defined in sRGB. - Create a color filter that multiplies the RGB channels by one color, and then adds a second color, pinning the result for each component to [0..255]. The alpha components of the mul and add arguments are ignored.
- Create a table color filter, copying the table into the filter, and applying it to all 4 components.
a' = table[a];
r' = table[r];
g' = table[g];
b' = table[b];
Components are operated on in unpremultiplied space. If the incoming colors are premultiplied, they are temporarily unpremultiplied, then the table is applied, and then the result is re-multiplied. - Create a table color filter, with a different table for each component [A, R, G, B]. If a given table is
None
, then it is treated as identity, with the component left unchanged. If a table is notNone
, then its contents are copied into the filter. - Create a table color filter that holds a ref to the shared color table.