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

Mixed palette causes weird behaviour #19

Closed
7studio opened this issue Mar 5, 2018 · 4 comments
Closed

Mixed palette causes weird behaviour #19

7studio opened this issue Mar 5, 2018 · 4 comments
Labels

Comments

@7studio
Copy link

7studio commented Mar 5, 2018

Hi Sergio,

Thank you for this project. I discovered it with the help of ACF RGBA Color Picker but I encounter an issue in my own plugin when I use a mixed palette like this one:

#ff0000
rgb(0,255,0)
rgba(0, 0, 255, 1)
rgba(80, 180, 255, .4)
rgba(255, 180, 80, .7)

I am aware about the data-reset-alpha attribute but it doesn't solve my problem because:

  1. when I don't use it, the alpha follows the colours when I switch between rgba to rgb or hex value (even if the colour comes from the defined palette).
  2. when I use it, the alpha of rgba values in palette is set to 1 every time I choose it.

The only solution that I found is to transform rgb and hex values to rgba equivalent with a 1 alpha…

Could the project reset the alpha value when the colour comes from the palette? Especially when you know that the palette was defined by a developer who chose these specific values.

@kallookoo
Copy link
Owner

Hi @7studio,
I apologize for taking so long to answer you,
I am modifying the script to support palettes with mixed values (hex, rgb, rgba)
I warn you when I upload it for you to try it,
I'll create another branch called beta, until I'm sure it works 100%.

In this week there will be new news!

@kallookoo kallookoo added the bug label May 9, 2018
@7studio
Copy link
Author

7studio commented May 16, 2018

Hi @kallookoo,

Don't be worry about your late answer. I'm enthousiast that you take into account
my need :) Actually my ACF plugin 7studio/acf-color-palette works well with my workaround (translate rgb and hex to rgba).

Don't be hesitant to ping me if you want I will try your beta branch with my work.

Thank you,
Xavier.

@kallookoo
Copy link
Owner

Hi,
Try the branch 3.0.0 and comment please.

@kallookoo
Copy link
Owner

Checked and maintains colors.
Just one detail and that is if for example it is defined as hex it converts it to rgb, but I don't see it as a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants