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

Use modern (CSS color level 4) syntax for colors in the color picker #139840

Open
glen-84 opened this issue Dec 28, 2021 · 3 comments
Open

Use modern (CSS color level 4) syntax for colors in the color picker #139840

glen-84 opened this issue Dec 28, 2021 · 3 comments
Assignees
Labels
editor-color-picker Editor color picker widget issues feature-request Request for new features or functionality
Milestone

Comments

@glen-84
Copy link

glen-84 commented Dec 28, 2021

When converting colors using the color picker, the old comma-based syntax is used:

image
(it should also show hsl here, at the top of the picker, not rgba)

Please update the picker to use the modern (CSS color level 4) syntax for colors.

With regard to the exact syntax, I agree with these suggestions from @mathiasbynens:

  • consider being opinionated w.r.t. how to represent alpha values. IMHO using percentage notation is most readable, as it clarifies the range: e.g. 70% vs 0.7
  • consider being opinionated about using the deg suffix where applicable, e.g. in the first parameter for hsl() and the last non-alpha parameter for lch(). Again, because this clarifies that the range lies between 0-360.

i.e. Use percentages for alpha, and always include the deg suffix.

This also matches the syntax displayed in Chrome developer tools.

@rebornix rebornix added editor-color-picker Editor color picker widget issues feature-request Request for new features or functionality *duplicate Issue identified as a duplicate of another issue(s) labels Jan 14, 2022
@glen-84
Copy link
Author

glen-84 commented Jan 15, 2022

@rebornix Please mention the issue that this duplicates. I searched before opening this, and again now, but I can't find one.

@rebornix rebornix reopened this Jan 31, 2022
@rebornix
Copy link
Member

I thought there is an easier one but I couldn't find it anymore. Let's use this issue to track CSS color level 4 syntax support.

@rebornix rebornix removed the *duplicate Issue identified as a duplicate of another issue(s) label Jan 31, 2022
@rebornix rebornix added this to the Backlog milestone Jan 31, 2022
@rebornix rebornix removed their assignment Dec 14, 2022
@aiday-mar aiday-mar self-assigned this Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor-color-picker Editor color picker widget issues feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

4 participants
@glen-84 @rebornix @aiday-mar and others