Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SaturationBar not properly picking up Value #85

Open
sikaiser opened this issue Jul 31, 2017 · 6 comments
Open

SaturationBar not properly picking up Value #85

sikaiser opened this issue Jul 31, 2017 · 6 comments

Comments

@sikaiser
Copy link

sikaiser commented Jul 31, 2017

While playing around with a setup that includes Picker, SaturationBar and ValueBar I noticed that the SaturationBar and ValueBar don't interact properly. There is always a little jump in the color when going from adjusting one bar to adjusting the other bar.

After a little digging I think I've found the problem: in the SaturationBar on line 478 it should be "mHSVColor[2]" instead of "1f"? Could someone correct this or instruct me as to how to do it myself? I am new to GitHub..

Thank you!

[EDIT] I realized that it is quite a bit more complicated and am currently working on a solution that I will gladly contribute if someone is interested.

@DaXmYsT
Copy link

DaXmYsT commented Aug 1, 2017

Hi @bermudaparty , I´m interested in your fix! :)

@sikaiser
Copy link
Author

sikaiser commented Aug 3, 2017

So I have a fix now that works. It is very rough around the edges though. I had to rewrite code in many places. I would appreciate instructions on how best to share, if someone is willing to explain. Otherwise I will look it up myself.

@DaXmYsT
Copy link

DaXmYsT commented Aug 3, 2017

You could fork that project I think. Last changes are 2 years old. If I where you I would ask LarsWerkman if he´s willing to update the project or not.

@DaXmYsT
Copy link

DaXmYsT commented Aug 7, 2017

@bermudaparty Any updates about this? :)

@sikaiser
Copy link
Author

sikaiser commented Aug 8, 2017

I've forked the project and uploaded my changes into there. https://github.com/bermudaparty/HoloColorPicker
Hope it works like this, I didn't have time to familiarize myself with the proper way of doing it.

@sikaiser
Copy link
Author

This is all really old by now. But if anyone is still interested, I just pushed some updates to my fork (/bermudaparty/HoloColorPicker) that now make the whole thing properly operable (in my opinion).

  • All the bars update each other real time.
  • This initially caused some wobbling and innaccuracies due to conversion between HSV and RGB. -> Everything is now handled in HSV and the wobbling gone.
  • This brings the added advantage that it was very easy to merge Saturation- and ValueBar into one class (OmniBar) that can be told at runtime whether it should set saturation or value (the only difference is the location in the HSV array). This does not really make a difference for using the whole thing, but it greatly simplifies further development as there is one less class to maintain now.

Maybe if I get around to it I'll create a pull request, but it doesn't look like it would ever be merged. So I might not bother.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants