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

Invalid hue - no slider #93

Closed
zb3 opened this issue Jun 8, 2013 · 3 comments
Closed

Invalid hue - no slider #93

zb3 opened this issue Jun 8, 2013 · 3 comments

Comments

@zb3
Copy link

zb3 commented Jun 8, 2013

in function set, line 533:
currentHue = newHsv.h;

but the problem is that we expect currentHue to be in this range: <0, 1>
so actually there should be:
currentHue = newHsv.h/360;

then slider works, but I don't know if this patch doesn't break other stuff

@bgrins
Copy link
Owner

bgrins commented Jun 10, 2013

Can you please make a test case showing the problem? You can fork this jsFiddle: http://jsfiddle.net/bgrins/ctkY3/. I'm not sure how the hue is becoming invalid in the first place.

@zb3
Copy link
Author

zb3 commented Jun 11, 2013

http://jsfiddle.net/ctkY3/748/
(try in FF, because I used input type=color)

red works, because even if hue was multiplied by Infinity, it's still 0, so it's ok
blue does not show hue slider, because hue is multiplied by 360. you expect hue to be in range 0, 1

@bgrins
Copy link
Owner

bgrins commented Jun 11, 2013

@zb3 thanks! This should now be fixed on: http://jsfiddle.net/ctkY3/749/. I will take care of a couple of other issues then tag a new release, but it is fixed in master.

@bgrins bgrins closed this as completed Jun 11, 2013
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