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

ColorPicker's colorspace not respected for output #11791

Open
Tracked by #34284
timelsass opened this issue Nov 13, 2018 · 3 comments
Open
Tracked by #34284

ColorPicker's colorspace not respected for output #11791

timelsass opened this issue Nov 13, 2018 · 3 comments
Labels
[Feature] Colors Color management [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Enhancement A suggestion for improvement.

Comments

@timelsass
Copy link
Contributor

Describe the bug
When selecting a colorspace in a ColorPicker component, I would expect that the colorspace is respected for output. It appears things are ran through tinycolor and just out put as RGB for custom colors inline.

To Reproduce
Steps to reproduce the behavior:

  1. Add a paragraph block.
  2. Open the ColorPicker from the ColorPalette.
  3. Change the colorspace to HSL.
  4. Change the background color to some custom color using the control.
  5. Inspect the editor where the background color was changed. Take not that the color was applied in the editor as RGB (despite having selected HSL).
  6. Save and publish the post.

The result is that the background color has now been set to a HEX value on the frontend.

Expected behavior

I expected to see the chosen colorspace respected for frontend (and in-editor) output. In the editor it appears that the colors are all applied as RGB, and the frontend are all applied in HEX.

Desktop (please complete the following information):

  • OS: Ubuntu 18.04.1 LTS
  • chrome
  • Version 69.0.3497.92 (Official Build) (64-bit)

Additional context

  • Gutenberg 4.3.0
@designsimply designsimply added the Needs Testing Needs further testing to be confirmed. label Nov 13, 2018
@RobStino
Copy link

Noticed this as well.
Additionally, the current user experience of inputting in the editor with one type of color value (e.g. HSL) and then having it switched to RGB next time the block is opened again doesn't feel right. It would be expected that the type used for input should persist in the editing experience as well as what is described above in actual output.

@youknowriad youknowriad added [Type] Enhancement A suggestion for improvement. [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later and removed Needs Testing Needs further testing to be confirmed. labels Oct 3, 2019
@skorasaurus
Copy link
Member

skorasaurus commented Oct 27, 2021

Confirmed this behavior - Despite selecting HSL in the colorpicker; In the editor it appears that the colors are all applied as RGB, and the frontend are all applied in HEX. - is reproducible in Gutenberg 11.7.0.

should be tracked in #34284

@ciampo ciampo mentioned this issue Feb 28, 2022
31 tasks
@skorasaurus
Copy link
Member

skorasaurus commented Nov 29, 2022

Still an issue in Gutenberg 14.6; in addition, colors edited in HSL; when exported by the theme (in global styles) are saved as HEX values. :(

We would like to represent our colors in HSL but this makes it impossible.

@skorasaurus skorasaurus added the [Feature] Colors Color management label Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Colors Color management [Priority] Low Used to indicate that the issue at hand isn't a top priority to address and can be handled later [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

5 participants