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

RGB and Alpha sliders not keeping alpha value on interaction #227

Open
lenadax opened this issue Apr 8, 2022 · 0 comments
Open

RGB and Alpha sliders not keeping alpha value on interaction #227

lenadax opened this issue Apr 8, 2022 · 0 comments

Comments

@lenadax
Copy link

lenadax commented Apr 8, 2022

Version: 5.5.2

Description:

On an iro color picker with a custom layout containing red / green / blue and alpha sliders, on sliding the alpha slider first, then sliding any of the red/green/blue sliders resets the alpha value to 1.
This behaviour only occurs on rgb/kelvin sliders in combination with alpha slider.

Minimal reproduction:

Consider the following pen: RGBA Slider Example
Create a color Picker with the following properties:

var colorPicker = new iro.ColorPicker(".yourElement", {
  color: "rgb(255, 0, 0)",
  layout: [
    {component: iro.ui.Slider, options: {sliderType: 'red'}},
    {component: iro.ui.Slider, options: {sliderType: 'alpha'}}
]});

Next, slide the alpha slider to a value below 1.
Then slide the red slider to any value.

Output: on sliding the red slider, alpha value gets reset to 1.
rgbaString also shows an alpha value of 1.
In the pen, we see that alpha value is preserved sliding the hue slider, but not while sliding the red slider.

I don't know if this is in fact intended behaviour, but for functionality I would prefer the active Color keep its alpha value in this case!

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

1 participant