build icon indicating copy to clipboard operation
build copied to clipboard

feature - accents

Open OyuDays opened this issue 9 months ago • 3 comments

add a variable $accent with this variable (perhaps activated by a flag), it would generate a variant of the theme with the $accent variable as every accent color

example:

template.json

$ npx @rose-pine/build -t templates/ -o output/ --accent

output/
> rose-pine-love.json
> rose-pine-gold.json
> rose-pine-rose.json
> rose-pine-pine.json
> rose-pine-foam.json
> rose-pine-iris.json
> rose-pine-dawn-love.json
> rose-pine-dawn-gold.json
> rose-pine-dawn-rose.json
> rose-pine-dawn-pine.json
> rose-pine-dawn-foam.json
> rose-pine-dawn-iris.json
> rose-pine-moon-love.json
> rose-pine-moon-gold.json
> rose-pine-moon-rose.json
> rose-pine-moon-pine.json
> rose-pine-moon-foam.json
> rose-pine-moon-iris.json

OyuDays avatar Mar 13 '25 19:03 OyuDays

I like this idea—my only concern is contrast. We would want to map an appropriate colour to be used atop each accent. E.g. if accent is pine, we would want something like:

.button {
  color: $($text|$text|$base);
  background: $accent;
}

But ideally, the color in the above example could be something like $on_accent and automatically get the correct foreground, as I assume it may not always be the same per accent.

mvllow avatar Mar 13 '25 20:03 mvllow

i am not too concerned about contrast, i feel most of the places where you would put the accent would just naturally have things that contrast nicely enough (usually $text color in the examples i can think of) my main reason for wanting this feature is just to make a more complete set of my theme instead of having to settle for a single color as the accent :)

OyuDays avatar Mar 13 '25 20:03 OyuDays

Feel free to test out #13 :)

mvllow avatar Mar 14 '25 02:03 mvllow