-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: