Skip to content

Changing the Alpha Slider on Color Picker changes RGB values on some colors #28758

Open

Description

Description

When using some RGBA colors on the color picker, adjusting the alpha slider also adjusts RGB values slightly. For example, if you enter the RGBA values 246, 110, 4, 1 on an Alpha-Enabled color picker and then adjust the Alpha slider, the Green value of "110" get's changed to "109". While the color change is minimal to the human eye, it makes it impossible to detect whether a change to the RGB values was intentional or not which is what I'm trying to detect.

Step-by-step reproduction instructions

  1. Go to https://wordpress.github.io/gutenberg/?path=/docs/components-colorpicker--alpha-enabled
  2. Change the RGBA values to 246, 110, 4, 1 (You may need to click outside the box to trigger an state update)
  3. Adjust the Alpha slider to any value

Expected behaviour

When adjusting the Alpha slider using this preset color configuration the none of the RGB values should change. Only the Alpha value

Actual behaviour

The green value changes from 110 to 109

Screenshots or screen recording (optional)

GIF

WordPress information

No Wordpress (Using github.io)

Device information

  • Device: Desktop Computer
  • Operating system: Windows 10
  • Browser: Chrome 88.0.4324.104 (Official Build) (64-bit)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    General InterfaceParts of the UI which don't fall neatly under other labels.Parts of the UI which don't fall neatly under other labels.[Feature] ColorsColor managementColor management[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions