

I added a helper function GetColorDistanceCIELab in ColorSpaceHelper class.I added Distance calculation in CIELab.cs.I changed Color class used from WinForm (System.Drawing) to WPF ().In fact, it was so good that I kept 99.9% of it and mainly just added 2 others classes (plus a Form to test).
#Random color generator code
I started from the excellent code found here on code project from Guillaume Leparmentier: Although, I haven’t seen a difference, the latest should give better results.
#Random color generator update
But Rob2412 (Thanks a lot Rob) give me the algorithm of CieLab2000 ( ) then I implemented it, tested it, and decided to update my code. This initial "Tips and tricks" was written with CieLab1997 algorithm. The color appears to me to have a greater distance between them. I decided to try to work with CieLab color distance and saw an improvement. Obtained results were sometimes with colors appearing to be too close to my eye. I thought HSL would be better and go with it.

An additional nice feature would be to start generate color with very high distance between them and reduce the distance while color quantity increase (in order to introduce new ones).Īfter reading some article/code (like: ), I realized that it would be probably more easier/effective to work with HSB or HSL. Also, I needed to be able to add myself some color to reject. I found many random generators but they didn’t keep tracks of already used colors and do not ensure to generate color far from used ones. I searched on the web for an already existing solution and I haven’t found any.
