Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
3
votes
3
answers
738
views
Customizing source-highlight's color schemes?
The `source-highlight` package is installed on my system. It highlights files I view with less using `/usr/bin/lesspipe` and `LESSOPEN` environment variable. Now, I want to change the color scheme this mechanism uses for some/all filetypes. I have root on the machine. How do I do this? Note: It's a...
The
source-highlight
package is installed on my system. It highlights files I view with less using /usr/bin/lesspipe
and LESSOPEN
environment variable.
Now, I want to change the color scheme this mechanism uses for some/all filetypes. I have root on the machine. How do I do this?
Note: It's a Devuan 3 Beowulf (~= Debian 10 Buster) Linux distribution.
einpoklum
(10753 rep)
Jan 4, 2020, 11:55 PM
• Last activity: Aug 2, 2025, 10:39 PM
91
votes
16
answers
117413
views
How to color diff output?
I wanted to format the Unix files conditionally, I am currently working on `diff` command and wanted to know if it is possible to format the text of the `diff` command output. Example: >Matched values should be displayed in green. Unmatched values should be displayed in red. Suppose I have two files...
I wanted to format the Unix files conditionally, I am currently working on
diff
command and wanted to know if it is possible to format the text of the diff
command output.
Example:
>Matched values should be displayed in green.
Unmatched values should be displayed in red.
Suppose I have two files file1
and file2
and my command is diff file1 file2
.
Now I wanted that suppose output contain 5 mismatch then those mismatch should be displayed in Red color. How to achieve this using unix?
In short "Change color to red for the output of diff command for values which mismatch"
Aman
(1281 rep)
Apr 16, 2015, 10:11 AM
• Last activity: Jul 25, 2025, 03:26 PM
101
votes
16
answers
85907
views
Removing control chars (including console codes / colours) from script output
I can use the "script" command to record an interactive session at the command line. However, this includes all control characters *and* colour codes. I can remove control characters (like backspace) with "col -b", but I can't find a simple way to remove the colour codes. Note that I want to use the...
I can use the "script" command to record an interactive session at the command line. However, this includes all control characters *and* colour codes. I can remove control characters (like backspace) with "col -b", but I can't find a simple way to remove the colour codes.
Note that I want to use the command line in the normal way, so don't want to disable colours there - I just want to remove them from the script output. Also, I know can play around and try find a regexp to fix things up, but I am hoping there is a simpler (and more reliable - what if there's a code I don't know about when I develop the regexp?) solution.
To show the problem:
spl62 tmp: script Script started, file is typescript spl62 lepl: ls add-licence.sed build-example.sh commit-test push-docs.sh add-licence.sh build.sh delete-licence.sed setup.py asn build-test.sh delete-licence.sh src build-doc.sh clean doc-src test.ini spl62 lepl: exit Script done, file is typescript spl62 tmp: cat -v typescript Script started on Thu 09 Jun 2011 09:47:27 AM CLT spl62 lepl: ls^M ^[[0m^[[00madd-licence.sed^[[0m ^[[00;32mbuild-example.sh^[[0m ^[[00mcommit-test^[[0m ^[[00;32mpush-docs.sh^[[0m^M ^[[00;32madd-licence.sh^[[0m ^[[00;32mbuild.sh^[[0m ^[[00mdelete-licence.sed^[[0m ^[[00msetup.py^[[0m^M ^[[01;34masn^[[0m ^[[00;32mbuild-test.sh^[[0m ^[[00;32mdelete-licence.sh^[[0m ^[[01;34msrc^[[0m^M ^[[00;32mbuild-doc.sh^[[0m ^[[00;32mclean^[[0m ^[[01;34mdoc-src^[[0m ^[[00mtest.ini^[[0m^M spl62 lepl: exit^M Script done on Thu 09 Jun 2011 09:47:29 AM CLT spl62 tmp: col -b
andrew cooke
(1121 rep)
Jun 9, 2011, 01:51 PM
• Last activity: Jul 25, 2025, 08:26 AM
27
votes
3
answers
28258
views
Check if terminal supports 24-bit / true color
In a shell script, how can I test programmatically whether or not the terminal supports 24-bit or true color? ---- Related: [This question](https://unix.stackexchange.com/questions/404414/print-truecolor-24-bit-test-pattern) is about printing a 24-bit / truecolor test pattern for eyeball verificatio...
In a shell script, how can I test programmatically whether or not the terminal supports 24-bit or true color?
----
Related: [This question](https://unix.stackexchange.com/questions/404414/print-truecolor-24-bit-test-pattern) is about printing a 24-bit / truecolor test pattern for eyeball verification
Tom Hale
(32892 rep)
Jun 18, 2018, 02:02 AM
• Last activity: Jul 22, 2025, 01:31 AM
327
votes
25
answers
1062867
views
Colorizing your terminal and shell environment?
I spend most of my time working in Unix environments and using terminal emulators. I try to use color on the command line, because color makes the output more useful and intuitive. What options exist to add color to my terminal environment? What tricks do you use? What pitfalls have you encountered?...
I spend most of my time working in Unix environments and using terminal emulators. I try to use color on the command line, because color makes the output more useful and intuitive.
What options exist to add color to my terminal environment? What tricks do you use? What pitfalls have you encountered?
Unfortunately, support for color varies depending on terminal type, OS, TERM setting, utility, buggy implementations, etc.
Here are some tips from my setup, after a lot of experimentation:
1. I tend to set
TERM=xterm-color
, which is supported on most hosts (but not all).
2. I work on a number of different hosts, different OS versions, etc. I use everything from macOS X, Ubuntu Linux, RHEL/CentOS/Scientific Linux and FreeBSD. I'm trying to keep things simple and generic, if possible.
3. I do a bunch of work using GNU screen
, which adds another layer of fun.
3. Many OSs set things like dircolors
and by default, and I don't want to modify this on a hundred different hosts. So I try to stick with the defaults. Instead, I tweak my terminal's color configuration.
4. Use color for some Unix commands (ls
, grep
, less
, vim
) and the Bash prompt . These commands seem to use the standard "ANSI escape sequences ". For example:
alias less='less --RAW-CONTROL-CHARS'
export LS_OPTS='--color=auto'
alias ls='ls ${LS_OPTS}'
I'll post my .bashrc
and answer my own question Jeopardy Style.
Stefan Lasiewski
(20733 rep)
Aug 10, 2010, 09:21 PM
• Last activity: Jul 10, 2025, 05:23 PM
0
votes
1
answers
4031
views
New user created in linux terminal and the colors don't work?
I've been working with Linux for a couple years as a CS graduate, but I've been using the root node the entire time. I know that isn't a good idea, so I finally added a user. But the terminal's colors for the new user don't work. In the root node, files were green, directories are blue text, highlig...
I've been working with Linux for a couple years as a CS graduate, but I've been using the root node the entire time. I know that isn't a good idea, so I finally added a user.
But the terminal's colors for the new user don't work.
In the root node, files were green, directories are blue text, highlighted in green, etc.
In my new user, it's all flat white.
I'd also like to change the default login to this new user, but don't know how to do that. When I launch Ubuntu, its default login is the root with no password.
I already edited the .bashrc file, uncommenting the line:
#force_color_prompt=yes
but still nothing. I also noticed changing this while logged into the new user also changes it in the root node. I thought the .bashrc file was unique per user?
Thanks!
Cani687
(21 rep)
Mar 23, 2022, 09:32 PM
• Last activity: Jul 9, 2025, 02:01 AM
0
votes
1
answers
1908
views
terminal in Tmux is 256color but vim isn't
Recently I installed tmux on my Ubuntu 16.04. The terminal screen in `tmux` shows 256 color correctly however when I opened `vim` within `tmux`, the color was different from what it showed when it was run directly on the terminal. I tried to add set -g default-terminal "screen-256color" in my `.tmux...
Recently I installed tmux on my Ubuntu 16.04.
The terminal screen in
tmux
shows 256 color correctly however when I opened vim
within tmux
, the color was different from what it showed when it was run directly on the terminal.
I tried to add
set -g default-terminal "screen-256color"
in my .tmux.conf
file but the problem still exists.
* my terminal screen in tmux
: 
* vim
run directly on the terminal: 
* vim
run within tmux
: 
The output of
echo $TERM; tput colors; tput longname
* outside tmux: xterm-256color 256 xterm* with 256 colors inside tmux:
screen-256color 256 GUN Screen with 256 colors
Dyckia
(101 rep)
May 24, 2018, 09:59 PM
• Last activity: Jul 6, 2025, 03:05 AM
54
votes
2
answers
33142
views
Print true color (24-bit) test pattern
How can I test that my terminal / tmux is correctly setup to display truecolor / 24-bit color / 16.8 million colours?
How can I test that my terminal / tmux is correctly setup to display truecolor / 24-bit color / 16.8 million colours?
Tom Hale
(32892 rep)
Nov 14, 2017, 07:51 AM
• Last activity: Jun 23, 2025, 03:23 PM
1
votes
1
answers
2092
views
LS_COLORS not respected on Cygwin
Whilst trying to configure ls' colors on Cygwin (specifically the distro babun), I found that the custom extension colors that were in the LS_COLORS environment variable weren't being used. Here's an example: `di=34:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43:*.tar=...
Whilst trying to configure ls' colors on Cygwin (specifically the distro babun), I found that the custom extension colors that were in the LS_COLORS environment variable weren't being used. Here's an example:
di=34:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43:*.tar=1;31
Normally, the ls
command should output white text for every file EXCEPT .tar files, which should be red. However, what I'm getting is white text for everything INCLUDING .tar files. I wonder if it's a problem with MSYS ls
, or if it's a problem with my shell (zsh).
Basically, the custom file extension colors that I try and define fall back to the default file color.
Here's the corresponding part of my .zshrc
where I've defined the ls
alias and run the output of dircolors
.
eval "dircolors /etc/DIR_COLORS
"
alias ls="/bin/ls --color=auto"
IllinoisJackson
(11 rep)
Mar 21, 2017, 09:14 PM
• Last activity: Jun 22, 2025, 03:05 PM
0
votes
1
answers
6813
views
Setting Colors in ~/.bashrc [CentOS 7]
I'm trying to set colors within my `.bashrc`. I would like my background to be black, bash prompt text to be white and input text to be lime green. I have this so far: export PS1="[\e[1;37;40m[\u@\W]\$ " however I am unable to change my input text to lime green.
I'm trying to set colors within my
.bashrc
. I would like my background to be black, bash prompt text to be white and input text to be lime green.
I have this so far:
export PS1="[\e[1;37;40m[\u@\W]\$ "
however I am unable to change my input text to lime green.
LinuxLamen
(1 rep)
May 2, 2019, 04:41 AM
• Last activity: Jun 17, 2025, 06:03 AM
23
votes
2
answers
21305
views
How can I keep color codes with grep input?
If I use two consecutive `grep` commands, e.g.: echo "foo bar" | grep foo | grep bar Then the first pattern ("foo") is not highlighted. In fact, it seems that grep removes color codes from its input. Is there any way to prevent this?
If I use two consecutive
grep
commands, e.g.:
echo "foo bar" | grep foo | grep bar
Then the first pattern ("foo") is not highlighted.
In fact, it seems that grep removes color codes from its input. Is there any way to prevent this?
Chris2048
(611 rep)
May 12, 2013, 03:16 PM
• Last activity: May 29, 2025, 12:33 PM
13
votes
5
answers
81335
views
How do I extract the colours from a PDF?
I have a PDF and I want to verify the colours being used (check that they match our corporate colour scheme for instance). Specifically, I want to check that the correct CMYK colours are being used. How could I go about doing that?
I have a PDF and I want to verify the colours being used (check that they match our corporate colour scheme for instance). Specifically, I want to check that the correct CMYK colours are being used.
How could I go about doing that?
Alex Chamberlain
(2090 rep)
Oct 17, 2012, 10:02 AM
• Last activity: May 20, 2025, 11:34 AM
326
votes
25
answers
281176
views
How to have tail -f show colored output
I'd like to be able to tail the output of a server log file that has messages like: INFO SEVERE etc, and if it's `SEVERE`, show the line in red; if it's `INFO`, in green. What kind of alias can I setup for a `tail` command that would help me do this?
I'd like to be able to tail the output of a server log file that has messages like:
INFO
SEVERE
etc, and if it's
SEVERE
, show the line in red; if it's INFO
, in green. What kind of alias can I setup for a tail
command that would help me do this?
Amir Afghani
(7373 rep)
Mar 1, 2011, 07:13 PM
• Last activity: May 9, 2025, 02:50 PM
154
votes
7
answers
169893
views
tput setaf color table? How to determine color codes?
I am in the process of colorizing my terminal’s `PS1`. I am setting color variables using `tput`; for example, here’s purple: PURPLE=$(tput setaf 125) ### Question: How do I find the color codes (e.g. `125`) of other colors? Is there a color table guide/cheat sheet somewhere? I’m just not sure what...
I am in the process of colorizing my terminal’s
PS1
.
I am setting color variables using tput
; for example, here’s purple:
PURPLE=$(tput setaf 125)
### Question:
How do I find the color codes (e.g. 125
) of other colors?
Is there a color table guide/cheat sheet somewhere?
I’m just not sure what 125
is … Is there some way to take a hex color and convert into a number that setaf
can use?
mhulse
(1859 rep)
Mar 11, 2016, 04:42 AM
• Last activity: Apr 27, 2025, 07:42 AM
7
votes
1
answers
513
views
rxvt-unicode and xterm different yellow colors in journalctl
Recently, I noticed something strange. If I run the command `sudo journalctl -f -u ModemManager` in `rxvt-unicode` (left) and `xterm` (right), in `rxvt-unicode` the yellow does not appear when the message is a warning. Both terminals have `TERM=xterm-256color` and I noticed this problem only in yell...
Recently, I noticed something strange. If I run the command
xterm Right:
sudo journalctl -f -u ModemManager
in rxvt-unicode
(left) and xterm
(right), in rxvt-unicode
the yellow does not appear when the message is a warning.
Both terminals have TERM=xterm-256color
and I noticed this problem only in yellow, as the red appears in both terminals.
I tried different escape sequences, but I was not able to detect the problem.

urxvt
" class="img-fluid rounded" style="max-width: 100%; height: auto; margin: 10px 0;" loading="lazy">
cacamailg
(193 rep)
Apr 13, 2025, 07:32 PM
• Last activity: Apr 15, 2025, 10:55 AM
1
votes
3
answers
3568
views
Losing color when starting screen session
I have a RHEL 6.9 host that loses its color when starting a screen session. Vim colors and directory colors exist before starting the screen session. Here are a few settings to help troubleshoot: - $TERM returns screen - I am using `force_color_prompt=yes` in my bashrc - `echo "$(tput setaf 1)red$(t...
I have a RHEL 6.9 host that loses its color when starting a screen session. Vim colors and directory colors exist before starting the screen session. Here are a few settings to help troubleshoot:
- $TERM returns screen
- I am using
force_color_prompt=yes
in my bashrc
- echo "$(tput setaf 1)red$(tput sgr0)"
successfully prints out red (in red)
Any advice on how to fix is appreciated, thanks!
ProdIssue
(965 rep)
May 14, 2018, 03:04 PM
• Last activity: Mar 18, 2025, 11:39 AM
268
votes
10
answers
351837
views
What causes this green background in ls output?
![screencap of ls output on linux machine][1] There are two directories shown by 'ls'. Normally directories anywhere are blue on black background. But the first one is blue on green and impossible to read. Why is this? How to make it blue on black, or at least something light on something dark? This...

DarenW
(3532 rep)
Oct 10, 2013, 06:56 PM
• Last activity: Feb 27, 2025, 06:53 PM
3
votes
3
answers
2122
views
Wrong colors in xterm
I don't quite understand XTerm's (UXTerm's in this case) behaviour regarding colors. I'm using Solarized Light color theme for Alacritty and UXTerm. They're more or less identical: `~/.alacritty.yml`: ``` # Colors (Solarized Light) colors: # Default colors primary: background: '0xfdf6e3' foreground:...
I don't quite understand XTerm's (UXTerm's in this case) behaviour regarding colors. I'm using Solarized Light color theme for Alacritty and UXTerm. They're more or less identical:
UXTerm:
Though all is fine in emacs:
Alacritty:
UXTerm:
Both pass this test I've found:
UXTerm:
The prompt:
EDIT2: Forgot to mention one (probably relevant) detail: if I get rid of the color scheme whatsoever, UXTerm starts to show colors at least _resembling_ Alacritty's:
So the direction is kinda correct. But it's plain unusable to me in this state.
~/.alacritty.yml
:
# Colors (Solarized Light)
colors:
# Default colors
primary:
background: '0xfdf6e3'
foreground: '0x586e75'
# Normal colors
normal:
black: '0x073642'
red: '0xdc322f'
green: '0x859900'
yellow: '0xb58900'
blue: '0x268bd2'
magenta: '0xd33682'
cyan: '0x2aa198'
white: '0xeee8d5'
# Bright colors
bright:
black: '0x002b36'
red: '0xcb4b16'
green: '0x586e75'
yellow: '0x657b83'
blue: '0x839496'
magenta: '0x6c71c4'
cyan: '0x93a1a1'
white: '0xfdf6e3'
~/.Xresources
:
#define S_base03 #002b36
#define S_base02 #073642
#define S_base01 #586e75
#define S_base00 #657b83
#define S_base0 #839496
#define S_base1 #93a1a1
#define S_base2 #eee8d5
#define S_base3 #fdf6e3
#define S_yellow #b58900
#define S_orange #cb4b16
#define S_red #dc322f
#define S_magenta #d33682
#define S_violet #6c71c4
#define S_blue #268bd2
#define S_cyan #2aa198
#define S_green #859900
!fonts&stuff
UXTerm*faceSize: 11
uxterm*eightBitInput: false
UXTerm*faceName: Fira Mono Regular
!Background & foreground
UXTerm*background: S_base3
UXTerm*foreground: S_base00
UXTerm*fading: 40
UXTerm*fadeColor: S_base3
UXTerm*cursorColor: S_base01
UXTerm*pointerColorBackground: S_base1
UXTerm*pointerColorForeground: S_base01
!UXTerm*borderColor: #343434
!Turning off scrollbar
UXTerm*scrollBar: off
!Starting up with a geometry
UXTerm*vt100*geometry: 160x50
!Colors
!-------------------------
!black
UXTerm*color0: S_base02
UXTerm*color8: S_base03
!red
UXTerm*color1: S_red
UXTerm*color9: S_orange
!green
UXTerm*color2: S_green
UXTerm*color10: S_base01
!yellow
UXTerm*color3: S_yellow
UXTerm*color11: S_base00
!blue
UXTerm*color4: S_blue
UXTerm*color12: S_base0
!magenta
UXTerm*color5: S_magenta
UXTerm*color13: S_violet
!cyan
UXTerm*color6: S_cyan
UXTerm*color14: S_base1
!white
UXTerm*color7: S_base2
UXTerm*color15: S_base3
Alacritty session:
trueneu@pop-os:~$ env | grep TERM
COLORTERM=truecolor
TERM=xterm-256color
UXTerm session:
trueneu@pop-os:~$ env | grep TERM
COLORTERM=truecolor
XTERM_VERSION=XTerm(353)
XTERM_SHELL=/bin/bash
XTERM_LOCALE=en_US.UTF-8
TERM=xterm-256color
But they show completely different behaviours color-wise:
Alacritty:




#!/usr/bin/env bash
awk 'BEGIN{
s="/\\/\\/\\/\\/\\"; s=s s s s s s s s;
for (colnum = 0; colnum255) g = 510-g;
printf "\033[48;2;%d;%d;%dm", r,g,b;
printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b;
printf "%s\033[0m", substr(s,colnum+1,1);
}
printf "\n";
}'
Alacritty:


PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
Same with ls
colors.
UXTerm's infocmp
, if it helps:
Reconstructed via infocmp from file: /lib/terminfo/x/xterm-256color
xterm-256color|xterm with 256 colors,
am, bce, ccc, km, mc5i, mir, msgr, npc, xenl,
colors#0x100, cols#80, it#8, lines#24, pairs#0x10000,
acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,
bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l,
clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=\r,
csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1%dD, cub1=^H,
cud=\E[%p1%dB, cud1=\n, cuf=\E[%p1%dC, cuf1=\E[C,
cup=\E[%i%p1%d;%p2%dH, cuu=\E[%p1%dA, cuu1=\E[A,
cvvis=\E[?12;25h, dch=\E[%p1%dP, dch1=\E[P, dim=\E[2m,
dl=\E[%p1%dM, dl1=\E[M, ech=\E[%p1%dX, ed=\E[J, el=\E[K,
el1=\E[1K, flash=\E[?5h$\E[?5l, home=\E[H,
hpa=\E[%i%p1%dG, ht=^I, hts=\EH, ich=\E[%p1%d@,
il=\E[%p1%dL, il1=\E[L, ind=\n, indn=\E[%p1%dS,
initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\,
invis=\E[8m, is2=\E[!p\E[?3;4l\E[4l\E>, kDC=\E[3;2~,
kEND=\E[1;2F, kHOM=\E[1;2H, kIC=\E[2;2~, kLFT=\E[1;2D,
kNXT=\E[6;2~, kPRV=\E[5;2~, kRIT=\E[1;2C, kb2=\EOE, kbs=^?,
kcbt=\E[Z, kcub1=\EOD, kcud1=\EOB, kcuf1=\EOC, kcuu1=\EOA,
kdch1=\E[3~, kend=\EOF, kent=\EOM, kf1=\EOP, kf10=\E[21~,
kf11=\E[23~, kf12=\E[24~, kf13=\E[1;2P, kf14=\E[1;2Q,
kf15=\E[1;2R, kf16=\E[1;2S, kf17=\E[15;2~, kf18=\E[17;2~,
kf19=\E[18;2~, kf2=\EOQ, kf20=\E[19;2~, kf21=\E[20;2~,
kf22=\E[21;2~, kf23=\E[23;2~, kf24=\E[24;2~,
kf25=\E[1;5P, kf26=\E[1;5Q, kf27=\E[1;5R, kf28=\E[1;5S,
kf29=\E[15;5~, kf3=\EOR, kf30=\E[17;5~, kf31=\E[18;5~,
kf32=\E[19;5~, kf33=\E[20;5~, kf34=\E[21;5~,
kf35=\E[23;5~, kf36=\E[24;5~, kf37=\E[1;6P, kf38=\E[1;6Q,
kf39=\E[1;6R, kf4=\EOS, kf40=\E[1;6S, kf41=\E[15;6~,
kf42=\E[17;6~, kf43=\E[18;6~, kf44=\E[19;6~,
kf45=\E[20;6~, kf46=\E[21;6~, kf47=\E[23;6~,
kf48=\E[24;6~, kf49=\E[1;3P, kf5=\E[15~, kf50=\E[1;3Q,
kf51=\E[1;3R, kf52=\E[1;3S, kf53=\E[15;3~, kf54=\E[17;3~,
kf55=\E[18;3~, kf56=\E[19;3~, kf57=\E[20;3~,
kf58=\E[21;3~, kf59=\E[23;3~, kf6=\E[17~, kf60=\E[24;3~,
kf61=\E[1;4P, kf62=\E[1;4Q, kf63=\E[1;4R, kf7=\E[18~,
kf8=\E[19~, kf9=\E[20~, khome=\EOH, kich1=\E[2~,
kind=\E[1;2B, kmous=\E[M, knp=\E[6~, kpp=\E[5~,
kri=\E[1;2A, mc0=\E[i, mc4=\E[4i, mc5=\E[5i, meml=\El,
memu=\Em, oc=\E]104\007, op=\E[39;49m, rc=\E8, rev=\E[7m,
ri=\EM, rin=\E[%p1%dT, ritm=\E[23m, rmacs=\E(B,
rmam=\E[?7l, rmcup=\E[?1049l\E[23;0;0t, rmir=\E[4l,
rmkx=\E[?1l\E>, rmm=\E[?1034l, rmso=\E[27m, rmul=\E[24m,
rs1=\Ec\E]104\007, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,
setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m,
setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m,
sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p5%t;2%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m,
sgr0=\E(B\E[m, sitm=\E[3m, smacs=\E(0, smam=\E[?7h,
smcup=\E[?1049h\E[22;0;0t, smir=\E[4h, smkx=\E[?1h\E=,
smm=\E[?1034h, smso=\E[7m, smul=\E[4m, tbc=\E[3g,
u6=\E[%i%d;%dR, u7=\E[6n, u8=\E[?%[;0123456789]c,
u9=\E[c, vpa=\E[%i%p1%dd,
Am I missing some configuration here? Is this how XTerm works? I don't really understand how's it capable of passing that test though.
EDIT:
After Thomas Dickey's answer, I've indeed tried to redefine .Xresources to be without C preprocessor #define
s. Here's the result:
!fonts&stuff
UXTerm*faceSize: 11
uxterm*eightBitInput: false
UXTerm*faceName: Fira Mono Regular
!Background & foreground
UXTerm*background: #fdf6e3
UXTerm*foreground: #657b83
UXTerm*fading: 40
UXTerm*fadeColor: #fdf6e3
UXTerm*cursorColor: #586e75
UXTerm*pointerColorBackground: #93a1a1
UXTerm*pointerColorForeground: #586e75
!UXTerm*borderColor: #343434
!Turning off scrollbar
UXTerm*scrollBar: off
!Starting up with a geometry
UXTerm*vt100*geometry: 160x50
!Colors
!-------------------------
!black
UXTerm*color0: #073642
UXTerm*color8: #002b36
!red
UXTerm*color1: #dc322f
UXTerm*color9: #cb4b16
!green
UXTerm*color2: #859900
UXTerm*color10: #586e75
!yellow
UXTerm*color3: #b58900
UXTerm*color11: #657b83
!blue
UXTerm*color4: #268bd2
UXTerm*color12: #839496
!magenta
UXTerm*color5: #d33682
UXTerm*color13: #6c71c4
!cyan
UXTerm*color6: #2aa198
UXTerm*color14: #93a1a1
!white
UXTerm*color7: #eee8d5
UXTerm*color15: #fdf6e3
Loaded the settings without -merge
just to be sure:
xrdb ~/.Xresources
And launched UXTerm:


Pavel Gurkov
(165 rep)
Sep 10, 2020, 09:45 PM
• Last activity: Feb 23, 2025, 11:47 PM
0
votes
0
answers
192
views
linux mint is rendering image colours incorrectly
**EDIT!** so i guess it's not a matter of colour profiles or operating systems, but of whatever program linux uses to render images by default..? maybe??? because when i open up the same image in both image viewer (left, incorrect colour perception) and imagemagick (right, correct colour perception)...
**EDIT!**
so i guess it's not a matter of colour profiles or operating systems, but of whatever program linux uses to render images by default..? maybe??? because when i open up the same image in both image viewer (left, incorrect colour perception) and imagemagick (right, correct colour perception), i get the same results as i do when i open it between firefox on linux and windows.

so i'm guessing now that i have to change the way linux renders images by default, if there's even a way to do that. it's not SUPER important, since i now know there's a program that can display my art correctly, but it would be nice.
**OG POST**
i've been gradually settling myself into mint the last few days, since i wanna start inching myself away from windows and all the crap it's pulling. i've mostly been able to figure out everything on my own, but one thing is tripping me up; the way that mint (or maybe ubuntu as a whole?) renders the colours of images is off.
i'm a digital artist. colour accuracy is something i really need to have. none of the usual colour profiling tools worked for me (gnome colour manager doesn't have the functionality i need, and every other effective tool needs an expensive piece of hardware that you stick to the screen)
so i then decided to boot up my windows VM and take a look at the same website, side by side. the colours come through differently!! top is how it's rendering in linux mint with firefox (incorrect, banner image colour does not match nav elements), bottom is how it's rendering in windows 11 pro with firefox (correct colours).

i checked the same image in clip studio paint (which i got running through playonlinux), and it's rendering the picture the same as it is in the windows VM. so while i at least don't have to worry about linux messing up my art WHILE i'm making it (and hopefully when i'm making breakpoints as well), this is still probably something that's gonna bug me...
anyone got tips for fixes, or do i just have to deal with it?
running linux mint 22.1 cinnamon 6.4.7 with the X11 display server. let me know if there's anything else i should include for you nerds, since i'm still pretty new at this whole linux thing.
sprite
(1 rep)
Feb 23, 2025, 06:39 PM
• Last activity: Feb 23, 2025, 10:42 PM
26
votes
1
answers
3206
views
Is there any manual page for colored shell output?
You know, that colorized output made by special char sequences, for example: echo -e "\e[34m Hello\n \e[0m" This will produce word "Hello" colored in blue. To do this I had to search on the web, and it is hard, because different sources may say something different. I thought, that there must be some...
You know, that colorized output made by special char sequences, for example:
echo -e "\e[34m Hello\n \e[0m"
This will produce word "Hello" colored in blue. To do this I had to search on the web, and it is hard, because different sources may say something different.
I thought, that there must be some manuals, but I couldn't find them. Even with
apropos color
or something similar.
So, the question is - where I can find reliable manuals?
Sergius
(833 rep)
Nov 7, 2015, 11:05 AM
• Last activity: Feb 11, 2025, 07:37 PM
Showing page 1 of 20 total questions