Skip to content

Instantly share code, notes, and snippets.

@emaV
Last active March 15, 2020 16:47
Show Gist options
  • Save emaV/14f0c29fae86c46a3cba0a18b4e9262a to your computer and use it in GitHub Desktop.
Save emaV/14f0c29fae86c46a3cba0a18b4e9262a to your computer and use it in GitHub Desktop.
Fix terminal blue

How to fix the deep blue

From: * terminal - Overriding the shade of color displayed - Unix & Linux Stack Exchange

I had a similar problem, but not under X-Windows. I have virtual boxes that I use to compile software on versions of the operating system other than the one I'm running. These have the standard "hardware console" and not a X-Terminal.

If found that the following worked for me:

echo -e "\\e]R\\e]PC6495ed"

I found that code sequence in the documentation! (duh!)

http://man7.org/linux/man-pages/man4/console_codes.4.html

Note that the first part \\e]R is the reset sequence. So it will reset the colors to their defaults.

The second part, \\e]PC6495ed is what changes the blue color. Two points here:

  1. The blue color is color number 12 (the C in that string)
  2. The P stands for Palette

You are limited to the first 16 colors of the basic console in this case.

You can modifiy ~/.Xresources on the local machine. See this for an example of themed ~/.Xresources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment