PROPHET/OS
NAME
theme: without a name
SYNOPSIS
theme [name|show|set|roles|selbsttest]
DESCRIPTION
Without a name: lists the known colour schemes and marks the one that is chosen with a *.
default the VGA palette, and what the machine ships with dracula nord gruvbox solarized
It sets the 16 text colours, writes the name to /system/config/theme and the palette as hex to /system/themes/console/colors, so the choice survives a restart.
**How it survives it**: the service list carries theme 3 once - theme apply, so at every start the saved name is read once and its palette set once, before the first prompt. theme apply is that path and nothing else; a palette is set and not watched, so nothing stays running for it.
Nothing chosen or a name nobody knows: nothing is touched, and the palette of the video mode stands. That is what a machine without a chosen theme looks like, and the run goes well.
theme show <name> says what a theme carries before anything is set: the sixteen places with their colour as hex, and a mark on every place the theme's own file sets. A preview in colour cannot stand beside it, because the palette is the hardware's: it would have to stay set until a key arrives, and that is the interactive half of the manager (R11-THEME-01).
theme set <name> <place> <rrggbb> writes one colour into /system/themes/<name>/colors and creates the folder if it is not there, so a theme is written by this program and not only by a hand from outside. The line is **appended**: the reader takes the last line a place carries, so an append is an edit and the file stays the difference it is.
A theme of its own
A name beside the five compiled schemes is a theme as soon as it carries a file: /system/themes/<name>/colors, or .../roles beside it. theme set own 1 102030 creates the folder and writes the line, theme own sets it, and theme apply sets it again at the next start. Such a theme is a **difference over default**, the same way a scheme's own colour file is a difference over the scheme.
Until 2026-10-14 the program refused every name no table of its own held, although the file would have worked, and that was the piece of R11-THEME-01 that kept a theme from being a file.
The name is one to eleven characters out of a-z, 0-9, - and _. That is a bound of safety: the name goes into a path, so a dot or a slash in it would write outside /system/themes, and until the themes were the five compiled names the table was what kept such a name out.
The roles
A palette says what colour 4 **is**. It cannot say that the head line of a table shall be blue instead of green, because that number used to stand in the tool: A_KOPF 0x2F and thirty more lay in top, mc, pmd, board, mdview and tiles (R11-THEME-01).
A tool asks for a **role** now and gets an attribute. The role is what it means, a title, a chosen line, a finding, and what that looks like the theme says. theme roles shows all of them with their attribute and marks the ones the chosen theme has set.
A theme names its roles in /system/themes/<name>/roles, one line role attribute, the attribute two hex digits, background in the upper nibble and foreground in the lower one. A # begins a comment. What the file does not name keeps the value compiled into lib/os/roles.c, so a theme is a difference and not a list somebody has to keep complete, and a role a later version adds is passed over by an older one instead of refused.
The fourteen roles: normal, title, title_name, head, head_active, selection, frame, tab, tab_active, bar_empty, quiet, warning, finding, foot.
nord is the first theme that carries a file of its own. A colour that only one tool has is no role and stays in that tool: what the CPU bars of top are coloured with says top, because nothing else means the same thing by it.
A role is read once per run. A palette change is seen at once by everything, because the sixteen numbers are the hardware's; a role change is seen by the next run of a tool.
EXAMPLE
$ theme
known themes:
* default (chosen)
dracula
nord
gruvbox
solarized
theme <name> switches, for example: theme dracula
a name beside these five is a theme too, as soon as /system/themes/<name>/colors stands