Not using Skia directly in C / C++ code, but rather in Compose for Desktop via
Skija bindings.
SkColorFilter::Blend accepts a single color and a blend mode. That can be used to colorize monochrome icons (like Material, for example) with SrcIn that respects the original alpha channel. But not all icon sets are monochrome.
Which lead me to try SkTableColorFilter::MakeARGB, constructing a set of 256 colors to colorize a multi-color icon, like the ones from
Tango iconset.
Here is how it looks like:
The colors are applied correctly on the main "content" of the icon, but also to all the partially or fully translucent pixels as well.
Is there a way to construct an SkColorFilter from a palette of colors and to respect the original alpha channel of the source image pixels?