cyotek / Cyotek.Windows.Forms.ColorPicker

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

Clicking center of ColorWheel returns mid range grey instead of white #2

Closed cyotek closed 10 years ago

cyotek commented 10 years ago

I think there is a problem with the color selection, it does not match the actual selected color try to select the white in the middle of the color wheel. In other words, you will get a gray 127, 127, 127 instead of white 255, 255, 255.

Good luck, Faisal

cyotek commented 10 years ago

This is because the SetColor gets a HSL color based on the angle (hue) and saturation. There's no luminance available though so it uses a default of .5, which gives you that middle grey. Change it to 1 and you'll get white... wherever you click in the wheel. Not quite as useful, I think you'll agree!

Not sure on how to fix this one to be honest. I'll have a think.

Regards; Richard Moss

cyotek commented 10 years ago

Fixed the bug where the LightnessColorSlider control couldn't be linked to a ColorWheel via the ColorEditorManager and have the values update as expected. Closing this issue now as you can link them up, then use the Color property of the ColorEditorManager to get a composite value.

faisalr commented 10 years ago

By the way I think it's not a hack it's the way HSL works.

Try using HSV (HSB) with value 1 instead of .5

Regards, Faisal

cyotek commented 10 years ago

Hello... I have no idea what you're referring to in regards to a hack.

As I've already mentioned, if you use a value of 1 you get a white wheel.