Skip to content

Generate color based on the given string. C# port of ColorHash Javascript Library.

License

Notifications You must be signed in to change notification settings

fernandezja/ColorHashSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ColorHashSharp

Generate color based on the given string. C# port of ColorHash Javascript Library.

NuGet version (ColorHashSharp) .NET Core Build status

Basic

Debug.WriteLine($"ColorHash >  Hello World");

var colorHash = new ColorHash();

//HSL (return HSL object)
var hsl = colorHash.Hsl("Hello World");

Debug.WriteLine($"  H = {hsl.H} | S = {hsl.S} | L = {hsl.L}");
//  H = 225 | S = 0,35 | L = 0,65


//RGB (return System.Drawing.Color object)
var color = colorHash.Rgb("Hello World");

Debug.WriteLine($"   R= {color.R} | G = {color.G} | B = {color.B}");
//  R= 135 | G = 150 | B = 197    

//Hex (return string)
var hex = colorHash.Hex("Hello World");

Debug.WriteLine($"  hex = {hex}");
//  hex = 8796C5

About

Generate color based on the given string. C# port of ColorHash Javascript Library.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages