cyotek / Cyotek.Windows.Forms.ColorPicker

Color picker control suite for Windows Forms applications.
http://cyotek.com/blog/tag/colorpicker
MIT License
149 stars 41 forks source link

The color wheel contains colors with different L values. #5

Open sheitmann opened 9 years ago

sheitmann commented 9 years ago

The colors on the border have a L value of 50. If you move the mouse more to the center you see (for example when using the ColorEditorManager) that the L value jumps sometimes to 49.

cyotek commented 9 years ago

Thanks for the report. This is probably rounding issues - the ColorWheel generates a 0.5 luminance HSL colour, but then converts it to a RGB Color which is used by IColorEditor. It's something I've mulled over before, but I have gone with ease of use - it's easier to consume RGB.

I think it you want as much accuracy as possible, you'd have to change the whole suite to run off HSL. I checked the conversion code, and this isn't code I wrote - and I don't seem to have made a note of where I sourced it from, slightly annoying.