svelte-palette icon indicating copy to clipboard operation
svelte-palette copied to clipboard

Feature Request: Add a way to manage groups of colors

Open untemps opened this issue 1 year ago • 0 comments

Sometimes, it would be useful to split the slots of colors into groups, to create collections for instance. The colors prop could be set with an array of specific object, like so:

const colors = [
  { name: 'Yellows', colors: ['#ff0', '#0f0', '#0ff'] }
]

Expected issues:

  • The compactColorIndices is not relevant for groups of colors: what indices of are they?
  • It might be difficult to mix single colors and group of colors: a choice in the API has to be made, to restrict to one type of entry for example

untemps avatar Dec 20 '23 08:12 untemps