tinted-theming / home

Style systems and smart build tooling for crafting high fidelity color schemes and easily using them in all your favorite apps.
MIT License
254 stars 12 forks source link

All sorts of questions about colors 0-7 #35

Closed joshgoebel closed 9 months ago

joshgoebel commented 2 years ago

Related: #34

Colors base00 to base07 are typically variations of a shade and run from darkest to lightest. ... In order to create a dark theme, colors base00 to base07 should span from dark to light. For a light theme, these colours should span from light to dark.

base00 - Default Background
base01 - Lighter Background (Used for status bars, line number and folding marks)
base02 - Selection Background
base03 - Comments, Invisibles, Line Highlighting
base04 - Dark Foreground (Used for status bars)
base05 - Default Foreground, Caret, Delimiters, Operators
base06 - Light Foreground (Not often used)
base07 - Light Background (Not often used)

So as we often see illustrated in yaml (commentary mine):

base00: "090300" #  ---- DARKEST BG
base01: "3a3432" #  --- less dark BG
base02: "4a4543" #  -- medium bg
base03: "5c5855" #  - brightest bg
base04: "807d7c" #  + dark foreground
base05: "a5a2a2" #  ++ default foreground
base06: "d6d5d4" #  +++ brighter foreground
base07: "f7f7f7" #  ++++ very bright foreground

So other than the #34 which seems entirely off I have a bunch of questions (and some of these stem from my conversation over in not all themes legible.


And now getting to a non-one liner...

are typically variations of a shade and run from darkest to lightest

If this is desirable (for UI purposes, shaded buttons, status bars, etc) then I'd consider (if the scheme allowed) letting templates perhaps choose their own shades of the BG/FG... (and then bare the responsibility for making them legible)

(yes I'm about to venture off into semantic colors and entirely diff ideas now)

background: "000000"
foreground: "ffffff"
allow_mix_FGBG: true

And then the templates would be able to request alpha blends of background and foreground... yes this opens us up to more than 16 colors, but NOT more than 16 hues.

Why do I ask this? I want to answer the question:

How can we support apps with UI bits (that need 8 shades of FG/BG) but also apps with no UI bits (like Terminal) that really would prefer 16 colors dedicated to ANSI.

I'd like to think (with care) we could expand our scope to support BOTH of these things.

I was going to try and figure out what to do about "legacy templates" but I think perhaps I'm overthinking it... if we add big new features and new templates to support them... perhaps if a scheme is "old" then that template just won't build it... if you're using say a new modern Terminal template that wants 16 ANSI terminal colors - but the scheme doesn't provide that - then that scheme would simply be skipped over... and only schemes compatible with that template would be built.

MultisampledNight commented 2 years ago

By the way, about the blending thing: Blending the RGB value linearly from 0 to 1 won't really fit the issue. If at all, I'd want to set LCH lightness stops for possible shades. Also background and foreground don't have to be the same hue.

joshgoebel commented 2 years ago

If at all, I'd want to set LCH lightness stops for possible shades.

Yes, exactly the kind of feedback we're looking for.

Also background and foreground don't have to be the same hue.

Of course not, but this also is really a concern of each individual style spec - they can be as forceful or lax as they wants in enforcing hues/color relationships in the palette. Personally I prefer more flexibility vs hard and fast rules. Base16 tends to be pretty flexible in this regard with it's liberal use of "typically" rather than "must".

More concern here has been expressed about legibility... schemes doing weird things with their colors such that a template can't be sure which fg/bg have contrast...

belak commented 9 months ago

I think it's unclear if/how this is actionable so I'm closing it for now. There's a possibility that most of these would be resolved by semantic aliases, but if there are other tickets or proposals which should come from this, please feel free to file them or let me know.