I'm playing with new release of SkiaSharp (1.55) that support loading SVG on Xamarin.Android (and not only). Due to the fact that it was release less than 10 days ago I couldn't find so much documentation.
After loading an SVG in black and white, I'd like to colorize it (changing the foreground filling color from black to any color I need). This is what I'm doing.
using (var paint = new SKPaint())
{
paint.ColorFilter = SKColorFilter.CreateLighting(SKColors.White, SKColor.Parse("#FF0000"));
}
The above code works fine, but I have the impression that I'm not using the right filter.
- Is there any filter with a kind of "colorize" function?
- How to achieve the same for background pixels instead?
- Any easy way to invert the colors?
Detailed explanations are welcome.