Linux – How to Brighten Up Blue Directories in ls –color

colorsconsolelinuxls

I see one other Dark blue color…-Q with the same problem:

Instead of two kinds of blue (normal and bright/bold) I have only one, very hard-to-read so-called "bold blue". Normal blue is even worse, almost invisible.

I don't want to change LS_COLORS. I do want directories in blue, but in a brighter one. I don't want them in magenta or green.

In dircolors' output I see dozens of extensions (tar, tgz, mp3) coding for bright red or magenta. And something as fundamental as a directory gets completely lost in it's midnight blue!

It is already set to bright:

`DIR 01;34 # directory`

or with dircolors -b:

  LS_COLORS='...di=01;34...'

In XTerm I can set *VT100*color12: SkyBlue2 in the app-defaults/ file. But for the console? The kernel only gives me 16 predefined ANSI colors!

Do I have to recompile the kernel to change these RGB definitions for the console? This navy blue must be coded somewhere!


/* added after 1st answer */

I tried echo -en "\e]PCrrggbb" as proposed: this works! This is really special – the bracket is the other way round. And "should be OSC" in the man page…thank you!

The link in dirkt's answer also has setvtrgb as a second solution. Number salad, but no escape codes.

Do these two methods amount to the same?

Best Answer

man 4 console_codes says that ESC ] P nrrggbb is an escape sequence to set the RGB value for color n.

This answer shows a small shell script to change all colors, so for color 12 something along the lines of

echo -en "\e]PC7373C9" # blue

(with your desired RGB values, of course) should work.

(Also consider having a look at the gamma values or color characteristics of your monitor that should be present in the EDID, and make sure they get picked up by your driver. This is often the reason standard colors don't "work" on a particular monitor).

Related Question