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

Allow alpha in different formats #50

Closed
gerardreches opened this issue Apr 16, 2024 · 7 comments
Closed

Allow alpha in different formats #50

gerardreches opened this issue Apr 16, 2024 · 7 comments

Comments

@gerardreches
Copy link

Right now alpha values are only available in rgba format.

This is an issue when for example the field value is pre-populated with an 8-digit HEX value.

It also makes impossible to replace the wpColorPicker palette with 8-digit HEX values.

@kallookoo
Copy link
Owner

That's right, since rgba support was more widespread than other formats.
When I have a moment I will look at how to select the format that should be returned.

@gerardreches
Copy link
Author

Thanks!

Besides being able to choose the returned format, would it be possible to also allow any format when prepopulating the input field? When prepopulating the palette as well.

@kallookoo
Copy link
Owner

Hi,

Check this branch; https://github.com/kallookoo/wp-color-picker-alpha/tree/issue-50

It is not tested with the palettes and review the Readme to know what options you have because by default it returns an rgba, but there is an option to modify its behavior.

@sutersoftware
Copy link

sutersoftware commented Jun 20, 2024

That's exactly what I needed too. Thank you very much. Version 303+50 works great for me.

@gerardreches
Copy link
Author

Using this version and setting data-alpha-color-type to octohex worked!

The palettes seem to be working as well.

Screenshot 2024-06-22 at 15 36 12 Screenshot 2024-06-22 at 15 38 28

@gerardreches
Copy link
Author

@kallookoo Could we get this merged any time soon? Thank you!

@kallookoo
Copy link
Owner

Added in version 3.0.4

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

No branches or pull requests

3 participants