Create a colour calculator for use when specifying theme colours
Summary
We are expanding the theming to allow mor colours to be customised. Ideally we would allow these colours to be specified in any colour space (rgb, hex, hsl). However, in order to easily perform calculations on the different channels, we need to convert any theme colour to hsl. This ticket is to explore methods to do this using pure CSS.
๐ฌ Description
- Explore how to perfrom colour conversions using pure CSS.
- If can't be done with pure CSS, explore other methods: CSS preprocessor, javascript applet, etc.
- Determine where in the flow this happens.
-
- Is this an applet on the webiste that outputs colour values that can be used to set tokens?
-
- Does this happen in background when setting a theme token value?
-
- Do we provide a number of tokens for people to specify in different ways? (--ic-action-h, --ic-action-s, --ic-action-l, --ic-action-r, --ic-action-g, --ic-action-b, --ic-action-hex)
๐ฐ User value
This makes it easier for users to specify colours, and provides ICDS with ability to perform complex calculations on the individual channels.
๐ User Stories
If relevant, describe the high-level functionality as user stories.
As an ICDS user:
I need
So that
๐ Acceptance Criteria
If relevant, describe in full detail the different interactions and edge cases that the component or patterns needs to fulfil.
Given
When
Then
โ Designs
If there's a Figma design file (or other mock-up), include it here.
##โฏ๐งพ Guidance If there's written guidance or documentation, include a link to it here.
Related tickets
#1496 #1047 #1662