The Linux Page

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

SMS From Me Logo

SMS From Me

To automatically start one on one conversations with your online leads.

     

   

Terms of Site Index

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

  • HTML
  • IsNull

    The Visual Basic function to check whether a value is set to Null. The PHP equivalent is is_null().

  • form
  • logo

    The term logo usually references a small image or icon used to represent a business or product. In computing, there is also the LOGO language, a simplified version of the lisp language, if I may.

  • status