Skip to content

Expand color scale with custom steps #4458

Description

@Febakke

Description

There has been multiple feedback on the need of a color used for icons. Out thought when building the color system was that text-subtle and text-default would be used. But in some cases there are a need to specificly control color for icons.

Naming

Icon is a very narrow use case. We should find a name that is more generic, but still semantic enough so that users understand what is should be used for.

Breaking changes

It must be backwards compatible, if not it would have to wait until v.2. But best case is to not do anything that breaks anything in production.

Solutions

1. Add another token to our color scales.

Simple solution, but need to be thought trough to fit with the rest of our semantic scale. It should be obvious what the color is supposed to be used for.

Adding it to the end of our scale would not break anything. (I think) But needs to implemented in theme builder, CLI and config.

Downside

  • What will we do when the next request comes in? Expand again? Might get bloated and to complex over time.

2. Alias tokens in the semantic layer

Another suggestion is to add a layer in the semantic/style. This would work as a way to connect one color from the color scale to an icon token.

Downside

  • You cannot create a unique color for icons. It needs to be one of the colors already in the scale
  • You would have to make a main, support and neutral version of the token
  • Can quickly expand with requests and get bloated

3. Add custom steps to color scale

Let the user create custom steps with unique name and color value for their use cases.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    $ tokensEverything related to tokens and Work related to @digdir/designsystemet-theme🎨 theme-builderEverything related to our theme builder💡feature request

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions