design-system-package-dsp
design-system-package-dsp copied to clipboard
[IDEA] `palette` collections
It makes sense that you could programmatically generate multiple DSPs (one per theme), but there are times where I would like to define smaller, focused palettes based on theme colors.
Example: Data Visualization
Say I have the following themes:
- Light
- Light (high contrast)
- Dark
- Dark (high contrast)
I would like to define a set of consistently named palettes for each theme, so that I can apply a palette to a project asset in a way that I can swap out the theme, but retain the applied palette.
Examples palettes may be:
- "bright" - base colors (e.g., Red 500, Blue 500, Green 500, etc.)
- "dim" - low saturation colors (e.g., Red 100, Blue 100, Green 100, etc.)
- "warm" - monochrome set of Reds or Oranges
- "cool" - monochrome set of Blues or Cyans
- "grayscale"
- etc.
I would expect the following to happen:
GIVEN I am using the "Light" theme, WHEN I apply the "bright" palette to a chart AND I switch to the "Dark" theme, THEN the client should apply the "bright" palette from the "Dark" theme to the same chart.
- client: an application, plugin, extension, etc. that consumes a DSP and applies it to project assets
- colors (a.k.a. "global palette"): set of
tokenentities of"type": "color" - palette:
collectionentity of"type": "palette"- a subset of colors in the global palette