The journalctl
command will color-code its messages. From its manual page:
When outputting to a tty, lines are colored according to priority: lines of level ERROR and higher are colored red; lines of level
NOTICE and higher are highlighted; lines of level DEBUG are colored lighter grey; other lines are displayed normally.
Red is red, on any of my systems. But the notion of 'highlighted' changes from system to system.
For instance gnome terminal (with TERM=xterm-256color
) uses this yellow for one machine:

But when doing an ssh
into a second machine, the same journalctl and the same TERM var, and the same terminal, shows as:

So the colors of "highlighting" must have been set outside the terminal configuration, and is host dependent. The question is: where is it defined?
NOTE:
There is a gnome terminal preference setting (Preferences/Profile/Colors/Highlight color) but this controls something completely different! When I set that, it changes the "selection color" so when I select text in the terminal with the mouse. Apparently the term highlight color is ambiguous here, and can mean different things.

The screenshot above shows "highlight color" but would be better called "selection color" as that is what changes when I set it.
How does systemctl define the "highlight color" for a terminal? And why does the terminal highlight color change when I login remotely into another system?
Both these systems run Ubuntu 23.04 OS.
Both systems run the same version of systemd.
Both systems have an empty configuration in /etc/systemd/journald.conf