You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a port to c# (.NET Standard 2.0 and .NET Framework 4.0) of
randomColor, David Merfield's
javascript random color generator. This was ported by
Nathan Jones so that users of the .NET family of
languages could enjoy these attractive colors.
I saw this project linked on Scott Hanselman's
excellent Newsletter of Wonderful Things
around the same time a coworker was creating an ad hoc visualization app. As we
watched the data appear on screen, we had to squint as some of the colors were
very difficult to make out against the background. This should make things
easier to see and will hopefully help others as well.
A simple demo in WPF is included so you can play with the various combinations.
Getting a single color is a simple matter.
usingRandomColorGenerator;
...var color =RandomColor.GetColor(ColorScheme.Random,Luminosity.Bright);
Or you can generate multiple colors in a single go.
NOTE: You should use the NetStandard package above if you're using a version of
.NET Framework that supports it. This Forms package may be deprecated in future.