What is the replacement of Android.Support.V7.Graphics.palette in Maui world

khatauli 1 Reputation point
2024-07-26T16:18:06.6166667+00:00

I am using the following lines of code to extract the theme color of the bitmap image in Xamarin, and I am not able to find how to replace this with the working code in Maui.

palette = Android.Support.V7.Graphics.Palette.From(bitmap).Generate();
var swatch = palette.VibrantSwatch;
swatch ??= palette.DominantSwatch;
var color = swatch.Rgb;
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,231 questions
0 comments No comments
{count} votes