Syndicate content

Console color: dark blue on black unreadable

As I work in consoles every now and then, I run in that one problem:

Some text is written in Dark Blue over the Black background:

This is a good example of what I'm talking about.

And if you can read that text, wow! (without selecting it first.

So... how could you change the color of that blue to make it readable? There is a way by sending some escape command to the console:

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

That command changes the color of the blue to a light blue (somewhat "cyan", although not light cyan.)

The "\\e]R" part is to reset the colors to the default. You may or may not want to do that...

The "\\e]PC6495ed" changes the blue color, or color C (12). The P stands for Palette. And the "6495ed" is the hexadecimal color. (the color as in HTML.) To change other colors, use the same sequence with a different color number and color code. For example, the background color can be set to white with: "\\e]P0ffffff" (watch out! now what you write will be gray on white if not white on white...)

Anyway, there is the result of that echo command:

This is the fixed blue color.

Although it is still a bit difficult to read, I can see the letters this time!

Source: http://man7.org/linux/man-pages/man4/console_codes.4.html (search for Palette)

Syndicate content

Diverse Realty

Diverse Realty Team

Want a New Home?
Want to Sell Your House?

Call Alex at
+1 (916)
220 6482

Alexis Wilke, Realtor
Salesperson
Lic. # 02024063

Cory Marcus, Broker
Lic. # 01079165

     

Terms of Site Index

Find the page/content you are looking for with our index.

  • C++
    Programming language based on the C language adding object features to the language.
  • Hardy
  • VB

    Abbreviation of Visual BASIC. See also VBA.

  • script
  • sha1