Short answer
It's a bug.
Full answer
It looks like the "correct" visualisation is the one on the left, where the bold font are not rendered. For what I could understand (here is the reference) the bold attribute was used, originally, to set the highlighted version of the 8 base colours.
Historically, there has been a one-to-one correspondence between the bolded versions of the 8 default ANSI colors and the bright versions of the 8 default colors. Back in the day, when a color program demanded the display of bold text, it was probably just easier for terminal emulators to display a brighter version of whatever color the text was (and expect the user to interpret that as bold) than to display a typeface with a bold weight.
Basically, what is happening here is that, in order to use the full Solarized palette, with the orange, purple and all the levels of grey, the colours are called with the bold attribute, which in turn refers to the alternative 8 colours of the ANSI palette.
Terminal understands this correctly, and shows the orange and the comment grey in normal typesetting, whereas tmux adds an unnecessary bold font to them. In conclusion, the left side is correct whereas the right one is not.
Question 2
Is there a way to disable the bold rendering of tmux?
I still have to do some research about it, and I will update this answer as soon as I find something.
Answer 2
And here we have the solution! :)
In order to have tmux behave correctly we have to call it telling him that we are in a 256 colours enabled environment.
TERM=xterm-256color /usr/bin/tmux
For convenience we could alias
this (i.e. you add alias tmux="<the line above>"
to your ~/.bashrc
).
Calling tmux
as tmux -2
, for forcing tmux to run with 256 colours support (instead of redefining the TERM
environmental variable) will not allow for correct interpretation of the "bold-alternative" 8 colours (i.e. the brighter variant will also result having a bold typesetting). Therefore, I highly recommend to use the solution here above for having both correct 256 colours interpretation and non-bold "bold-alternative" colours.
Best Answer
Xterm is configured via X resources. This is how you might configure it for white on black, with a lighter blue than the default (adjust the color as you see fit, obviously):
You can use X color names (you can see all the color names with
xcolors
or in a file calledrgb.txt
which may be somewhere under/etc/X11
,/usr/X11
or/usr/share/X11
or some similar location depending on your system) or#RRGGBB
.colorBD
is the color used for bold; withcolorBDMode
set tofalse
(the default), this setting is ignored and bold text is displayed in a bold font. The same goes forcolorUL
,colorULMode
and underline. You can go beyondcolor8
(up tocolor255
, or less depending on the xterm version and compile-time configuration).color8
throughcolor15
correspond to 0–7 with bold; colors beyond 16 are rarely used by applications unless you've explicitly configured them.Put these settings into a file called
~/.Xdefaults
. Most systems load this file automatically when you log in. If yours doesn't, add this command to your X startup script:To test the appearance of foreground color 42 over background color 17, run this in a shell in that terminal:
If your xterm is compiled without extended color support, you'll need to use the classical control sequences:
The foreground and background color must be in the range 0–7 in that case. If your xterm is compiled with 16-color support, replace
[3
and[4
by[9
and[10
respectively to select the bright versions (colors 8–15).