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

Center of color wheel turns out gray. #10

Open royben opened 6 years ago

royben commented 6 years ago

image

cyotek commented 6 years ago

Hello,

Thanks for the bug report. If I remember correctly, this is probably the same root cause as #5 (basically due to how internally the color is converted to RGB and back). I have a bug long list of things to do, I'll try and get to sorting out the mess I made of this library sooner rather than later.

Thank you again for the report!

Regards; Richard Moss

allendotson commented 6 years ago

Hi Richard! Do you know if there is any timeline on this? Or where I would look into helping repair this?

cyotek commented 6 years ago

Hello,

Firstly apologies for the delay in actually replying to the issue (let alone the delaying in fixing it).

I just took a quick look to refresh my memory on how the code works and found my initial comment above seems incorrect. There are (probably, bear in mind I've spend maybe 10 minutes looking 😊) two issues, both in SetColor.

The first is the lines which reset the saturation to 0 if the distance is less than 6 - this causes the snapping to the center when you get close.

if (distance < 6)
{
  saturation = 0; // snap to center
}

Deleting those 3 lines seems a good first start.

The second issues is when the HslColor is constructed - it ignores the current lightness value and always substitutes this with 0.5. This should use the current value if that property has been set externally.

I'm actually hoping to get back onto working on our color editor Soon(tm), at which point I'll be addressing some of the high DPI issues that have been reported so I'll make a concerted effort to address this issue too.

Once again, apologies for the delay in responding or fixing.

Regards; Richard Moss

pc8181 commented 5 years ago

is that fixed 2018 i just download and test the same i got gray color not white in color wheel.

cyotek commented 5 years ago

Hello,

No it's not fixed. I have a huge amount of work to do to the Color Picker controls and I simply haven't got time to make a start on it yet.

Regards; Richard Moss