Skip to content

Should themes-16 also be a TUI/multiplexer escape hatch? #52

Description

@shanemcd

Problem

The 256-color themes (like themes/ghostty) put unused Base16 colors on ANSI indices 16-21. That's useful for Base16 passthrough themes, but it breaks apps that still assume the old xterm cube, where index 16 is black.

Zellij's default theme does that for status bar / ribbon text:

pub const BLACK: u8 = 16; // zellij-utils/src/shared.rs

Same scheme via Tinty:

Terminal Tinty themes-dir Zellij default UI
Ghostty themes/ghostty (sets 16-21) unreadable (16 = base09)
iTerm2 themes-16/iterm2-applescripts fine (16 left alone)

Why Ghostty has no themes-16 path

themes-16/ is for terminals that can't set palette 16-21 (iterm2-applescripts, kermit, rio). Ghostty can, so it only lives under themes/ghostty.

That misses another case: terminals that can set 16-21, but users still want classic xterm 16-255 because of multiplexers / TUIs.

The README also says most people won't notice 16-21 unless they're on passthrough themes. Zellij's default theme is a pretty clear counterexample.

Workaround example

I ended up not using Zellij's default theme at all:

  1. Custom tinted-light / tinted-dark truecolor themes, wired through theme_dark / theme_light
    https://github.com/shanemcd/dotfiles/blob/0fba682f50ba83202ee897328deca3249126c7dd/dot_config/zellij/config.kdl#L343-L597

  2. A Tinty hook to flip those when the scheme changes (Zellij won't do that live), plus OS-specific terminal items (Ghostty/iTerm on macOS, Konsole on Linux)
    https://github.com/shanemcd/dotfiles/blob/0fba682f50ba83202ee897328deca3249126c7dd/dot_config/tinted-theming/tinty/config.toml.tmpl

Works, but it's a lot of local config. Nothing in the README points people here.

Options

  1. Leave themes-16 as capability-only, and document that multiplexer users should theme the app itself
  2. Treat themes-16 as "xterm-compatible / multiplexer-safe" too, and add themes-16/ghostty (maybe more)
  3. Stop writing 16-21 by default on terminals that already generate 16-255 (Ghostty palette-generate), and only keep 16-21 where passthrough needs it

I lean (2) or (3). Right now the capability-only split just leaves this as a footgun.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions