#3591838 preserve color format in addition to color scheme
Every color row in brand kit can be hovered over to reveal the current color as a CSS string. There was a concern that this not consistent.
- HSL form -> shows hsl() color value
- Hex form -> shows #hex color value
- RGM form -> shows #hex color value
👀
Although there are three forms, there are only two color schemes - HSL and RGB. The #HEXVAL and rgb(n,n,n) are different ways to represent RGB.
Since RGB can be represented two ways, referencing the colorScheme is not sufficient for knowing what format the hover text should show. We need to add an additional property to the color entity to track the display format.
Testing instructions
- enable 'canvas_dev_mode' module
- Run DB updates to add Color entity type
- enable 'canvas_test_code_components_color' to install 3 Brand Kit colors
- In canvas, go to brand kit -> colors. Brand Red should be Hex, Brand Green should be hsl, Brand Blue should be RGB
- You can also edit colors, switch format and the hover text should be in whatever format the change was saved in
Closes #3591838 (closed)
Edited by Ben Mullins