A code for grabbing the color palette from an image. Uses C# and .NET to make it happen.
This is a ported project of Color Thief
Many thanks for C# code UWP Version
https://www.nuget.org/packages/ksemenenko.ColorThief/
https://www.nuget.org/packages/ksemenenko.ColorThief.Forms/
| Platform | Supported | Version |
|---|---|---|
| WinUI 3 | Yes |
var colorThief = new ColorThief();
colorThief.GetColor(sourceImage);In this example, we build an 8 color palette.
var colorThief = new ColorThief();
colorThief.GetPalette(sourceImage, 8);For Xamarin.Forms
await CrossColorThief.Current.GetPalette(sourceImage);