Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to work on systems which display some colors that are hard to read. I ssh into these systems, but don't have management permission to change the colors they display. Is there any way I can override the shade's of colors in my terminal emulater? (I use konsole)

share|improve this question
up vote 3 down vote accepted

Each terminal emulator has its own way of setting color shades (or not). Xterm uses X resources, some of the newer emulators have dialog boxes, some have configuration files.

In Konsole, edit the color scheme in your profile (from the menu: “Settings / Edit current profile”, “Appearance” tab, select a color theme and edit it or make a new one).

There is a common control sequence to set the shade associated with a color number from the application: OSC 4 ; c ; spec BEL where OSC is ESC ], c is the color number and spec is a color spec such as #RGB.

printf %b '\e]4;4;#6495ed\a'  # set the blue shade to CornflowerBlue

A change by the application is only effective until the next terminal reset. If you use this method (only recommended if your terminal lacks a configuration mechanism), to make the change effectively persistent, append the color configuration escape sequence to your terminal's reset string (termcap: r1 string; terminfo: rs1 string).

share|improve this answer
huh... I always thought color profile just changed like background/cursor/typed text didn't realize it could change other colors. – xenoterracide Apr 7 '11 at 9:50

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!)


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.

share|improve this answer

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.