PaletteNet 3.0.1
dotnet add package PaletteNet --version 3.0.1
NuGet\Install-Package PaletteNet -Version 3.0.1
<PackageReference Include="PaletteNet" Version="3.0.1" />
paket add PaletteNet --version 3.0.1
#r "nuget: PaletteNet, 3.0.1"
// Install PaletteNet as a Cake Addin #addin nuget:?package=PaletteNet&version=3.0.1 // Install PaletteNet as a Cake Tool #tool nuget:?package=PaletteNet&version=3.0.1
PaletteNet
Library to extract prominent colors from an image.
- Dominant
- Vibrant
- Vibrant Dark
- Vibrant Light
- Muted
- Muted Dark
- Muted Light
.NET port of Android's Palette https://developer.android.com/reference/android/support/v7/graphics/Palette.html
Install
https://www.nuget.org/packages/PaletteNet
Target frameworks:
- net6.0
- net6.0-android
- net6.0-windows10.0.19041.0
- netstandard2.0
- net48
Example (WinUI3)
using IRandomAccessStream fileStream = await file.OpenAsync(FileAccessMode.Read);
BitmapDecoder decoder = await BitmapDecoder.CreateAsync(fileStream);
PaletteColors palette = PaletteColors.Generate(new BitmapDecoderHelper(decoder));
Color dominantColor = palette.DominantColor;
IEnumerable<Color> allColors = palette.GetAllColors();
or
IBitmapHelper bitmapHelper = new BitmapDecoderHelper(decoder);
PaletteBuilder paletteBuilder = new PaletteBuilder();
Palette palette = paletteBuilder.Generate(bitmapHelper);
int? rgbColor = palette.MutedColor;
int? rgbTextColor = palette.DominantSwatch.TitleTextColor;
Sample app
Download app from Microsoft Store
<a href='https://www.microsoft.com/en-us/p/palettenet-sample-app/9MTQD4S7C86H?cid=badgegithub'> <img width='240' height='96' src='https://get.microsoft.com/images/en-us%20dark.svg' alt='English badge'/></a>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net6.0-windows10.0.19041 is compatible. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-android34.0 is compatible. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.8
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
-
net6.0
- No dependencies.
-
net6.0-windows10.0.19041
- No dependencies.
-
net8.0
- No dependencies.
-
net8.0-android34.0
- Xamarin.AndroidX.AppCompat (>= 1.6.1.6)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on PaletteNet:
Package | Downloads |
---|---|
PaletteNet.WriteableBitmapEx
.NET port of Android's Palette |
GitHub repositories
This package is not used by any popular GitHub repositories.
Target .Net 6