Theming
gest lets you change the colours of its terminal interface. You can override two things:
- The palette. Each palette slot is a named colour, such as
primaryorwarning, and many elements of the interface use the same slot. - Single theme tokens. A token is one element of the interface, such as
log.error.
The theme settings go in the [colors] section of your config file.
How theme resolution works
gest builds each style in three layers, and each layer overrides the one before it:
- The built-in defaults.
- The overrides in
[colors.palette]. - The token overrides in
[colors.overrides].
A palette override replaces the foreground colour of every token that uses that slot. The token keeps
its built-in modifiers, such as bold, italic or underline.
A token override is the most specific layer. It can replace the foreground and background colours of one token, and add text modifiers to it.
Supported color formats
A colour can have one of two formats:
- A named ANSI colour, such as
red,yelloworbright_cyan. The names ignore case. - A hex colour with 6 digits, in the format
#RRGGBB.
gest knows these named colours:
black, red, green, yellow, blue, magenta, cyan, white,
bright_black, bright_red, bright_green, bright_yellow, bright_blue,
bright_magenta, bright_cyan, bright_white
Put a palette key or a token name that has a dot in double quotes, such as "text.muted". Without the
quotes, TOML reads the dot as a nested table, and gest stops with a configuration error.
Quick example
[colors.palette]
primary = "#7CC4F0"
warning = "#E3A22B"
"text.muted" = "#8B93A7"
[colors.overrides]
"log.error" = "#FF6B6B"
"tag" = { fg = "#4EA8E0", italic = true }
"config.heading" = { fg = "#4EA8E0", bold = true, underline = true }Palette slots
The palette has 11 slots:
| Key | Default | Used for |
|---|---|---|
accent |
#D05830 |
warm highlights |
border |
#30323A |
rules and borders |
error |
#D03838 |
error states |
primary |
#4EA8E0 |
brand emphasis |
primary.dark |
#3278B0 |
dark accents |
primary.light |
#7CC4F0 |
light accents |
success |
#36BE78 |
success states |
text |
#C4C8D4 |
body text |
text.dim |
#585E6E |
dim text |
text.muted |
#7C8294 |
secondary text |
warning |
#CC9820 |
warning states |
Example:
[colors.palette]
primary = "#5AB0FF"
success = "#47C97B"
text = "#E3E7F1"
"text.muted" = "#98A1B3"Token overrides
Token overrides go in [colors.overrides]. Each key is the name of a token, with dots between its
parts.
Simple form
The string form sets only the foreground color:
[colors.overrides]
"log.warn" = "yellow"
"message.success.icon" = "#36BE78"Table form
The table form can set colours and text modifiers:
[colors.overrides]
"search.query" = { fg = "#F4F7FF", bold = true }
"markdown.blockquote" = { fg = "#8B93A7", italic = true }
"banner.update.version" = { fg = "#FFCC4D", bold = true }The table form has these fields:
| Field | Type | Description |
|---|---|---|
fg |
string | Foreground color |
bg |
string | Background color |
bold |
boolean | Enable bold text |
dim |
boolean | Enable dim text |
italic |
boolean | Enable italic text |
underline |
boolean | Enable underline |
Token reference
gest knows the token keys below.
Core
emphasiserrormutedsuccesstagborder
Artifact views
artifact.detail.labelartifact.detail.separatorartifact.detail.valueartifact.list.archived.badgeartifact.list.tag.archivedartifact.list.titleartifact.list.title.archived
Configuration views
config.headingconfig.labelconfig.no_overridesconfig.value
Confirm prompt
confirm.descriptionconfirm.indicatorconfirm.selectedconfirm.unselected
IDs and status indicators
id.prefixid.restindicator.blockedindicator.blocked_by.idindicator.blocked_by.labelindicator.blocking
Init output
init.command.prefixinit.labelinit.sectioninit.value
Iterations
iteration.detail.count.blockediteration.detail.count.doneiteration.detail.count.in_progressiteration.detail.count.openiteration.detail.labeliteration.detail.valueiteration.graph.branchiteration.graph.phase.iconiteration.graph.phase.labeliteration.graph.phase.nameiteration.graph.separatoriteration.graph.titleiteration.list.summaryiteration.list.titleiteration.status.labeliteration.status.progressiteration.status.value
Lists
list.headinglist.summary
Logs
log.debuglog.errorlog.infolog.timestamplog.tracelog.warn
Markdown rendering
markdown.alert.caution.bordermarkdown.alert.important.bordermarkdown.alert.note.bordermarkdown.alert.tip.bordermarkdown.alert.warning.bordermarkdown.blockquotemarkdown.blockquote.bordermarkdown.code.blockmarkdown.code.bordermarkdown.code.inlinemarkdown.emphasismarkdown.headingmarkdown.linkmarkdown.rulemarkdown.strong
Messages
message.created.labelmessage.success.iconmessage.updated.label
Meta
meta.not_setmeta.value
Migrate
migrate.count
Notes
note.detail.labelnote.detail.separatornote.detail.valuenote.list.bodynote.list.id
Projects
project.list.archived.badgeproject.list.rootproject.list.root.archivedproject.show.value
Search
search.expand.separatorsearch.no_results.hintsearch.querysearch.summarysearch.type.label
Serve
serve.url
Task and iteration status
status.cancelledstatus.donestatus.in_progressstatus.open
Tasks
task.detail.labeltask.detail.separatortask.detail.titletask.detail.valuetask.list.icon.cancelledtask.list.icon.donetask.list.icon.in_progresstask.list.icon.opentask.list.prioritytask.list.titletask.list.title.cancelled
Markdown shorthand aliases
Each markdown.* token has a short alias that starts with md.. You can use the aliases in
[colors.overrides]:
| Shorthand | Resolves to |
|---|---|
md.alert.caution.border |
markdown.alert.caution.border |
md.alert.important.border |
markdown.alert.important.border |
md.alert.note.border |
markdown.alert.note.border |
md.alert.tip.border |
markdown.alert.tip.border |
md.alert.warning.border |
markdown.alert.warning.border |
md.blockquote |
markdown.blockquote |
md.blockquote.border |
markdown.blockquote.border |
md.code.block |
markdown.code.block |
md.code.border |
markdown.code.border |
md.code |
markdown.code.inline |
md.emphasis |
markdown.emphasis |
md.heading |
markdown.heading |
md.link |
markdown.link |
md.rule |
markdown.rule |
md.strong |
markdown.strong |
md.code maps to markdown.code.inline, not to markdown.code.
Notes
banner.gradient.start,banner.gradient.end,banner.shadowandmarkdown.alert.important.borderhave built-in RGB colours. No palette slot changes them.markdown.emphasisandmarkdown.stronghave only modifiers by default, so a palette override does not change them. Override the token itself to colour them.- gest ignores an unknown palette key or an unknown token name, and prints a warning.