delta icon indicating copy to clipboard operation
delta copied to clipboard

🚀 16 colour theme

Open WhyNotHugo opened this issue 2 weeks ago • 0 comments

Context

I've gone through the effort of configuring delta to be readable on light mode and on dark mode by using separate themes.

The way this works is that delta uses specific colours when rendering depending on the system theme, but if the system theme changes after it renders (for example, while I'm scrolling through a 500 line diff, or when I have a diff next for reference next to my editor) the colours remain the same, and become unreadable with the new terminal theme.

In order words: when the system theme transitions to dark theme, the text previously rendered by delta remains dark, and is not dark-on-dark and becomes unreadable.

Example content rendered in dark mode:

Image

The same terminal when the theme changes:

Image

Feature request

I'd like to see support for 16colour themes. That is, themes which use the regular colours:

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
\e[0;36m Cyan
\e[0;37m White

If these colours are used, when the terminal's colour theme changes, the colours automatically update to the new theme.

This is what ls does, for example. If the terminal theme changes after it renders, the colours update accordingly.

Example ls rendered in light mode:

Image

The same terminal when the theme changes:

Image

Using the 16-colour theme also has high guarantees that the text is readable, since the colour in the theme will have been chosen with that intent.

WhyNotHugo avatar Dec 05 '25 15:12 WhyNotHugo