d2 icon indicating copy to clipboard operation
d2 copied to clipboard

Add new dark theme: Dark berry blue

Open ppenguin opened this issue 1 year ago • 3 comments

The number of built-in dark themes is lacking compared to the light themes. This PR aims to be a first step to alleviate this, in submitting a dark variant of "Mixed Berry Blue".

As a side note: it would be logical to make the IDs of themes a bit more symmetrical: since the ID category seems to be 200 <= DarkThemeID < 300, it is a logical expectation that a dark variant of an existing light theme is LightID + 200?

It would be a reasonable goal to work toward "dark theme coverage" in this sense too?

ppenguin avatar Aug 23 '24 21:08 ppenguin

@ppenguin Thanks for this PR! Can you screenshot what it looks like?

And no the goal isn't to have a dark theme equivalent to every light theme. There's very few themes I've seen in the software world that have a light and dark version. Even then, if you saw their light and dark versions among others, it wouldn't be obvious they belong to the same theme, so they're kind of just two different themes. D2 should categorize the two separately -- mirrors of light/dark themes are fine as long as they make sense and look good, but no need to have mirrors for every theme.

alixander avatar Aug 24 '24 11:08 alixander

@ppenguin Thanks for this PR! Can you screenshot what it looks like?

Here's a screenshot: themex-205

And no the goal isn't to have a dark theme equivalent to every light theme. There's very [few themes] ... so they're kind of just two different themes. D2 should categorize the two separately -- mirrors of light/dark themes are fine as long as they make sense and look good, but no need to have mirrors for every theme.

Makes sense, no need to go overboard, it's just that the choice of "tones" felt kind of incomplete, from gut feeling I think a few more would be nice, this one would go into the category "dark pastel blue/purple".

That would make the status like this:

  • Dark Mauve: Brownish/old-purplish
  • Dark Flagship Terrastruct: Dark sharp blue
  • Dark Berry Blue: Dark pastel blue/purple

and possibly TODO:

  • something dark green-tint
  • something dark "blood"/"vampire"?
  • dark pinkish
  • dark ocre/yellow

This branch has a handy build script to (re)generate an example for all available themes (you can include it in the codebase if you want to).

ppenguin avatar Aug 24 '24 14:08 ppenguin

@ppenguin Nice build script! I think that'd be useful as a dev tool in the d2themes package if you want to make a separate PR to help include that. The hardcoded theme value in the d2 file used should be removed though (https://github.com/ppenguin/d2/blob/ppdev/testdata/examples/themex.d2#L6).

No obligation to of course, will keep this in mind and get to it myself down the road if not.

alixander avatar Aug 28 '24 14:08 alixander