Sida 1 av 1

"Terminals should generate the 256-color palette from the user's base16 theme"

Postat: 07 apr 2026, 22:06
av Hund

If you've spent much time in the terminal, you've probably set a custom base16 theme. They work well. You define a handful of colors in one place and all your programs use them.

The drawback is that 16 colors is limiting. Complex and color-heavy programs struggle with such a small palette.

The mainstream solution is to use truecolor and gain access to 16 million colors. But there are drawbacks:

Each truecolor program needs its own theme configuration.
Changing your color scheme means editing multiple config files.
Light/dark switching requires explicit support from program maintainers.
Truecolor escape codes are longer and slower to parse.
Fewer terminals support truecolor.
The 256-color palette sits in the middle with more range than base16 and less overhead than truecolor. But it has its own issues:

The default theme clashes with most base16 themes.
The default theme has poor readability and inconsistent contrast.
Nobody wants to manually define 240 additional colors.
The solution is to generate the extended palette from your existing base16 colors. You keep the simplicity of theming in one place while gaining access to many more colors.

https://gist.github.com/jake-stewart/0a ... e2177e1783