Dynamensions.ColorPalleteGenerator 1.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Dynamensions.ColorPalleteGenerator --version 1.1.0
NuGet\Install-Package Dynamensions.ColorPalleteGenerator -Version 1.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Dynamensions.ColorPalleteGenerator" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dynamensions.ColorPalleteGenerator --version 1.1.0
#r "nuget: Dynamensions.ColorPalleteGenerator, 1.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Dynamensions.ColorPalleteGenerator as a Cake Addin
#addin nuget:?package=Dynamensions.ColorPalleteGenerator&version=1.1.0

// Install Dynamensions.ColorPalleteGenerator as a Cake Tool
#tool nuget:?package=Dynamensions.ColorPalleteGenerator&version=1.1.0

Dynamensions Color Pallete Generator

A quick and simple color pallet generator. Give it the number of colors needed, and it will produce a pallet. There is also an option to include black or include white in the pallet.

The pallet is generated by creating the red, green, and blue, then halves the process (128 red, then 128 green, then 128 blue, etc....) and repeats until the number of colors is reached.

Example

C#

// Create a list of colors using RGB. Great for charts or presentations that use bright distinct colors.
IEnumerable<string> colors = ColorPalleteGenerator.CreateUniqueEvenlyDistrutedColorsUsingRGB(20);

// Create a list of colors using HSV. Great for color pickers.
IEnumerable<string> colors = ColorPalleteGenerator.CreateUniqueEvenlyDistrutedColorsUsingHSV(20);

// Create an enumerable of colors using a spiral algorithm. Used for applications that need a wide variety of colors.
IEnumerable<string> colors = ColorPalleteGenerator.CreateUniqueSpiraledColorsUsingHSV(5000, 0, 1);

VB.NET

' Create a list of colors using RGB. Great for charts or presentations that use bright distinct colors.
Dim colors As IEnumerable(Of String) = ColorPalleteGenerator.CreateUniqueEvenlyDistrutedColorsUsingRGB(20)

' Create a list of colors using HSV. Great for color pickers.
Dim colors As IEnumerable(Of String) = ColorPalleteGenerator.CreateUniqueEvenlyDistrutedColorsUsingHSV(20)

' Create an enumerable of colors using a spiral algorithm. Used for applications that need a wide variety of colors.
Dim colors as IEnumerable(Of String) = ColorPalleteGenerator.CreateUniqueSpiraledColorsUsingHSV(5000, 0, 1);

Notes:

  • There are no exception handling so that the error can bubble up. Error handling is left up to the host of this library.
  • When using the CreateUniqueSpiraledColorsUsingHSV method, colors are unique to a certian point. The example above is asking for 5000 colors using a hue angle of 1. - This will calculate the next color 1 degree from the last. So, this method can create 5000 unique colors. This hasn't been tested for more than 5000 colors.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Dynamensions.ColorPalleteGenerator:

Package Downloads
Dynamensions.ColorPicker.Maui

A simple to use color picker for .NET Maui.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.3.0 95 5/13/2024
1.2.2.1 66 5/13/2024
1.2.2 66 5/12/2024
1.2.1 63 5/12/2024
1.2.0 73 5/12/2024
1.1.0 72 5/11/2024
1.0.2 73 5/10/2024
1.0.1 76 5/9/2024
1.0.0 80 5/9/2024

- Added new methods to create color pallets.
- Updated existing methods to create more unique colors.