GNOME Console (kgx) color schemes ("liveries") via dconf
gnomekgxgnome-consoleterminaldconfgvariantcolor-scheme
GNOME Console (kgx, not gnome-terminal) calls its color schemes liveries. Each livery has a UUID and a required night palette plus an optional day palette. Custom liveries live in a single dconf dictionary, so a script can install a full terminal theme with two dconf write calls.
dconf keys (/org/gnome/Console/)
livery: UUID string of the active livery.custom-liveries:a{sv}dictionary of custom liveries.transparency(bool),custom-font(e.g.'Adwaita Mono 12'),use-system-font(bool),font-scale(double 0.5 to 4.0),theme(auto,night,day;hackeris deprecated and equals night).
Built-in livery UUIDs: KGX default 9f1374fd-f199-429f-bae6-9cf1260f6e3e, Linux 131b4aac-399b-4ee4-a8e1-f22e5c3c7bdd, XTerm 54156855-4a0d-454a-9d5a-7d3e2c9f26f5.
GVariant format
Colors are (r, g, b) tuples of doubles 0.0 to 1.0; colours is the 16 ANSI colors in order (black, red, green, yellow, blue, magenta, cyan, white, then the bright variants); transparency is a double where 0.0 is opaque.
dconf write /org/gnome/Console/custom-liveries \
"{'my-uuid': <{'uuid': <'my-uuid'>, 'name': <'My Theme'>, 'night': <{'foreground': <(1.0, 1.0, 1.0)>, 'background': <(0.1, 0.1, 0.1)>, 'colours': <[(0.0, 0.0, 0.0), ...]>, 'transparency': <0.0>}>}>}"
dconf write /org/gnome/Console/livery "'my-uuid'"
Revert everything: dconf reset -f /org/gnome/Console/.
.livery import/export keyfile
[Livery]
UUID=my-uuid
Name=My Theme
[Night]
Foreground=FFFFFF
Background=1A1A1E
Transparency=0.0
Colours=241F31;C01C28;2EC27E;F5C211;1E78E4;9841BB;0AB9DC;C0BFBC;5E5C64;ED333B;57E389;F8E45C;51A1FF;C061CB;4FD2FD;F6F5F4
Hex without #, semicolon-separated.
Gotchas
- kgx's own palette serialization had a bug (the blue channel written from
.red); writing dconf directly bypasses it. - Changes apply to newly opened Console windows, not existing ones.
- Give each theme its own UUID; a shared UUID makes themes overwrite each other.
- In a shell string, GVariant needs single braces; doubled braces from careless Python f-string escaping fail silently.