fix(ui): gate 256-index custom themes on terminal depth - #785
Merged
Conversation
This was referenced Jul 26, 2026
indaco
force-pushed
the
fix/stream-aware-color-enablement
branch
from
July 26, 2026 20:59
f09f49d to
a40d27b
Compare
indaco
force-pushed
the
fix/custom-theme-256-color-gate
branch
from
July 26, 2026 20:59
7d5fff4 to
38b0456
Compare
A custom theme built from 256-colour indexes used to paint on every terminal, including ones that can only render 16 colours, and reported itself as applied so nobody noticed the garbled output. malt now recognises a 256-colour tier from COLORTERM then TERM, and degrades any theme the terminal cannot render to the default palette.
indaco
force-pushed
the
fix/custom-theme-256-color-gate
branch
from
July 26, 2026 21:00
38b0456 to
16552c2
Compare
indaco
added a commit
that referenced
this pull request
Jul 27, 2026
A custom theme built from 256-colour indexes used to paint on every terminal, including ones that can only render 16 colours, and reported itself as applied so nobody noticed the garbled output. malt now recognises a 256-colour tier from COLORTERM then TERM, and degrades any theme the terminal cannot render to the default palette. (cherry picked from commit 07d163a)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
A custom theme built from 256-index colour numbers used to paint on every terminal, including ones that can only render 16 colours - malt's palette ladder went straight from truecolor to 16 with no tier in between, and nothing ever read
TERM. On a basic terminal that meant garbled or invisible colours with no way to notice, because the theme reported itself as applied.malt now recognises a 256-colour tier (
COLORTERMfirst, then a256colorTERM) and gates each custom theme on the depth it actually needs: hex/RGB themes still require truecolor, integer-index themes now require at least 256 colours, and anything a terminal cannot render degrades to the default palette instead of emitting escapes it cannot honour.This changes existing output. If you use a custom theme with numeric colour values on a terminal that advertises neither truecolor nor 256-colour support, you will now see malt's default palette where you previously saw (incorrectly rendered) theme colours. Setting
TERMto a*-256colorvalue restores it on a terminal that genuinely supports 256 colours.Related Issue
Notes for Reviewers
This is part 3 of 3 in a stack made with GitButler: