-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
ColorPicker with alpha returns wrong values #15110
Comments
Forgot to paste the object displayed by
|
Confirmed this by:
The b value changed to 31. I suspect this is a rounding error when converting HSV to RGB. Not sure how we could fix it without supporting decimal places in these fields. |
This is still an issue today. Testing with WordPress 5.9.3 + Gutenberg latest dev version. color.alpha.mp4 |
This problem seems to be the same as #28758. |
We're not using |
Describe the bug
I have a custom block that includes a
ColorPicker
onChangeColor
only sets the color to an attribute, using the functiononChangeBoxShadowColor
from a different componentNotice that I have a
console.log
so I get the value of the colorIf I set this values:
The
b
value changes to 31, and there are more 'changes' if I play with the valuesTo reproduce
Steps to reproduce the behavior:
Expected behavior
Values shouldn't change
Screenshots
![colorpicker](https://camo.githubusercontent.com/4b94de8804f20ec91e69c6af9b78459db7f9cc0dc70c7a2f657b8dabae53bfb7/68747470733a2f2f73656e7469646f7765622e636f6d2f74656d702f677574656e626572672d636f6c6f727069636b65722e676966)
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: