-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[p5.js 2.0 Beta Bug Report]: HSB colors ending up black #7710
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
Comments
Some more debugging: it seems that this is an issue in colorjs's |
I'm not acutally using the custom HSB color space as the color.js HSV color space is equivalent so I'm using that instead. The problem might be that HSV color which it will be serialized to is not natively supported as CSS string. I'll look into a possible solution for this. |
What is the output of |
It's getting set to |
I'll have a look tomorrow. |
@davepagurek I just had a test and from what I can see, HSB color is working correctly, in that it returns an rgb string of the created color in HSB. I think the issue here is with fill(270, 100, 100);
ellipse(width/2, height/2, 100); and I see a purple circle at the center of the canvas. |
@davepagurek Did you perhaps fix this yesterday or at some point after beta 6 because I can't replicate issue with the random poetry example with latest dev-2.0 |
I added some clamping to the inputs to |
Yeah I think clamping probably fixed it and probably should be done for this case. I think it would be nice to support per vertex fill in 2D as well if at all possible. We don't have to implement it now if it can be considered undocumented feature, and implement it later as a feature enhancement. |
Cool, I think we're safe to close this issue then, and I'll make a new one for per-polygon fills in 2D as a feature enhancement. |
New issue: #7722 |
Most appropriate sub-area of p5.js?
p5.js version
2.0 beta 6
Web browser and version
Firefox
Operating system
MacOS
Steps to reproduce this
These pages on the beta site use
fill()
with colors created in HSB mode:On 1.x, these have colors, and we would expect this behaviour to continue in 2.x:
The text was updated successfully, but these errors were encountered: