ic-ui-kit icon indicating copy to clipboard operation
ic-ui-kit copied to clipboard

Create a colour calculator for use when specifying theme colours

Open DBD324 opened this issue 1 year ago โ€ข 0 comments

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

DBD324 avatar Mar 14 '24 15:03 DBD324