The "transparent" feature relies upon the applications which run in the terminal to not explicitly set the background color. In particular, when clearing the background, these applications should not set the color. That corresponds to a terminal feature known as back color erase, or bce
.
The TERM=screen-256color
entry tells applications that they have to set the color when clearing the display (to ensure that the current color is used). There is a different terminal description screen-256color-bce
which would do what you want in this case.
Further reading:
There are eight standard ANSI colors, supported by every terminal emulator. Most terminal emulators also have eight bright variants of the standard ANSI colors.
However, the actual color values that the escape codes map to aren't standardized, and in fact they often slightly vary among terminal emulators. So if you do printf "\e[31;47mTest\n"
to print red text on a white background, the actual hues of red and white you get may be different depending on the terminal emulator you use.
So that partly explains the problem: color values aren't standard, and LXTerminal
may have different defaults for its color palette that you're not used to. If you look around in the settings, usually you can configure the color scheme to be whatever you like.
The other problem you face is that what the bold attribute actually does isn't standardized either. There are three possibilities: it can make the font bold, it can make the foreground color brighter, or it can both make the foreground color brighter and make the font bold.
Again, the default behavior here varies among terminal emulators, and you can usually change it if can you find the right setting. Grep for something mentioning 'bold' or 'bright'.
If you want to use a bright color, then you can use the so-called aixterm color escape codes instead of bold. These aren't standard, but they're supported in every modern terminal emulator I know of. Unlike bold, they always use bright colors, plus they can be used to display bright background colors.
So for example, if you wanted to print bright red text on a bright white background, you would do this: printf "\e[91;107mTest\n"
.
For reference, here's a table of all the color escape codes:
| ANSI | ANSI | ANSI | | Aixterm | Aixterm
| Color | FG Code | BG Code | Bright Color | FG Code | BG Code
+---------+---------+-------- +----------------+---------+--------
| Black | 30 | 40 | Bright Black | 90 | 100
| Red | 31 | 41 | Bright Red | 91 | 101
| Green | 32 | 42 | Bright Green | 92 | 102
| Yellow | 33 | 43 | Bright Yellow | 93 | 103
| Blue | 34 | 44 | Bright Blue | 94 | 104
| Magenta | 35 | 45 | Bright Magenta | 95 | 105
| Cyan | 36 | 46 | Bright Cyan | 96 | 106
| White | 37 | 47 | Bright White | 97 | 107
Best Answer
Unlike
screen
,tmux
does not have switchable background colour erase capability in its terminal emulator. Erasure is always with the default background colour, never the current background colour.Nicholas Marriott added it to the to-do list in September 2015, but stated at the time that neither he nor anyone else cares enough about it to implement it.
He later implemented it in October 2016, nearly a year after this answer was originally written.
Further reading