Skip to main content

Questions tagged [colors]

It is possible to use colors on the Unix command-line interface.

Filter by
Sorted by
Tagged with
0 votes
0 answers
22 views

How can I get tput to fill the whole background without leaving a border?

I'm using bash in cygwin on a Windows laptop. I'd like to be able to change the background color of my terminal to green (actual color irrelevant) and to do that I can use either of these commands: ...
Ed Morton's user avatar
  • 32.4k
-1 votes
1 answer
21 views

wezterm > tmux > nvim colors not forwarded through tmux correctly

I'm currently having the problem that the colors are not forwarded correctly from nvim through tmux to wezterm. I think tmux is to blame since the colors work like expected when I invoke nvim from ...
glades's user avatar
  • 99
0 votes
0 answers
8 views

Highlight the cursor of current directory in different color with respect to cursors higher and lower in the file system tree

I am using ranger for a few days now which I find a great piece of software and I was wondering if it possible to set the highlighting of the cursor to a different color for the one poiting to the ...
ecjb's user avatar
  • 445
0 votes
0 answers
17 views

Disable colors in emacs terminal

How to disable all colours in emacs running in a terminal? Note that I don't want disabling just a buffer. I don't want (global-font-lock-mode 0) because that only works on normal buffers, however ...
ccthecc's user avatar
0 votes
1 answer
120 views

Set the number of colours in an LMDE6, 64Bit, with Cinnamon Desktop, which is based on debian 12

inxi -Fxz System: ... Device-1: Intel 4th Gen Core Processor Integrated Graphics vendor: Dell driver: i915 v: kernel arch: Gen-7.5 bus-ID: 00:02.0 Display: x11 server: X.Org v: 1.21.1.7 with: ...
Alfred.37's user avatar
  • 137
0 votes
1 answer
71 views

Solaris 11.4 console color

I am trying to change the color of my tty in Solaris.  I am not referring to Xterm or termcap, but to the TTY itself. I am a FreeBSD user.  For example, you can change the color directly from the VT ...
fah81's user avatar
  • 21
0 votes
1 answer
220 views

Is it possible to change the color of the tmux status bar in command mode?

When I type Prefix-: to start typing a command, tmux changes the color of the status bar to dark yellow. A similar effect happens if I push Prefix-, to change the name of a window. Is it possible to ...
merlin2011's user avatar
  • 3,985
0 votes
1 answer
347 views

Change color of root user prompt

I wanted to enable color in the shell as the root user on Ubuntu Server 22.04 after having typed sudo -s. I found this question which led me to the solution of uncommenting the force_color_prompt=yes ...
ubiquibacon's user avatar
0 votes
0 answers
19 views

How to change colours of text & lines in header rows/columns in LibreOffice Calc?

In LibreOffice Calc, how does one change the colours of the text in the header rows and columns? I'm referring to the "A", "B", "C", ... and "1", "2"...
End Antisemitic Hate's user avatar
0 votes
1 answer
54 views

How Can I Change The Backgound Color in Lynx From `lynx.cfg`?

I am using this script, from another stack extange post. It allows me to force Lynx to use the proper terminal colors. The issue is that the backgound color is incorrect, and it is reading the 7th ...
VehementHam's user avatar
0 votes
0 answers
17 views

Change urxvt colors [duplicate]

I want to change the colors used by the terminal. I can change colors 0 to 15 in .Xresources with commands like: *color0 #abcdef How can I change the RGB hexcode for colors 16+?
jediapingveno's user avatar
0 votes
1 answer
35 views

Cannot change the color of variable in dir_colors

I use a fork of the st terminal. When I type anything after a dollar sign, I cannot see the text because it blends in with the background. I use dir_colors to change colors of different file types. ...
Hari Shankar's user avatar
2 votes
1 answer
87 views

How to restore desktop color settings?

OS is Debian 12. Video driver is Nvidia 525.147.05. I'm trying to play an older game via wine that uses directx. (diablo 2). I launched the game in windowed mode, but when I did so, the colors of the ...
cat pants's user avatar
  • 487
-1 votes
1 answer
99 views

iTerm2 color scheme: use alternative background color (41m)

I have set up iTerm2 to change its profile when I ssh to a specific machine. This works as intended (I am using zsh and oh-my-zsh). The main thing I do for this is in my ~/.zshrc file: echo -e "\...
Andreas's user avatar
1 vote
0 answers
134 views

I feel like my :colorscheme is not displayed correctly. There is so much terminology involved. What are vim color modes?

I have a feeling that the :colorschemes I'm using in Vim are not displayed properly. That the colors are corrupted. I think this because I have 3 virtual machines rented from 3 different vendors, two ...
michal roesler's user avatar
0 votes
0 answers
75 views

Why is Nano refusing to use syntax colouration?

I am running Alpine Linux 3.18. I have installed nano 7.2 and nano-syntax 7.2, and my $TERM is set to "xterm-256color", but I'm not getting any syntax colours in Nano. The file is a Ruby &...
Sod Almighty's user avatar
1 vote
1 answer
317 views

Is there any way to enable ansi colors in journalctl logs?

foo.py prints ansi colored output in my terminal Now if I execute foo.pyin a systemd unit and journalctl --all -u foo.service --output cat -f all output is monochrome. How can I journalctl systemd ...
jjk's user avatar
  • 411
1 vote
0 answers
136 views

Why suddenly apt-get output became colored?

I'm trying to get wine. I've been doing instructions from https://wiki.winehq.org/Ubuntu and on sudo apt update I've seen "E: The repository 'cdrom ..." with red "E". Just several ...
Martian2020's user avatar
  • 1,219
2 votes
0 answers
63 views

How to best define nano & terminal colour scheme for light Windows terminals (cmd)?

It has been a usual thing for me to log into my Debian servers via a Windows cmd terminal during daylight. This is why the terminal has white background and black text. Now, when editing a file with ...
bomben's user avatar
  • 509
-1 votes
1 answer
236 views

How does a terminal produce accurate colors?

Background I am using terminals in various settings. Often the color output of programs is not correctly rendered on the screen. The internet is full of recipes for fixing the colors for specific ...
sjdh's user avatar
  • 241
-2 votes
1 answer
78 views

Understanding escapes used for changing text colour

I know that things: To change the output text to red, I need output an escape code like \033[31m. The \ is the escape. The 033 is the ASCII escape code in octal. But my question is, why I need to ...
Magenta's user avatar
  • 15
2 votes
1 answer
1k views

How to display rgb hex colors on terminal using python?

Using ANSI escape sequence, I can change the color of text that python prints. The example below prints "Hi World" in light blue. #!/usr/bin/python3 print(f'\033[38;5;117mHi World') While ...
un31389's user avatar
  • 21
1 vote
0 answers
48 views

Coloring man pages doesn't work anymore? [duplicate]

I've had this for more than 3 years in my bashrc: man() { LESS_TERMCAP_md=$'\e[01;31m' \ LESS_TERMCAP_me=$'\e[0m' \ LESS_TERMCAP_se=$'\e[0m' \ LESS_TERMCAP_so=$'\e[01;44;33m' \ ...
Enlico's user avatar
  • 1,677
0 votes
0 answers
37 views

Truncate output to terminal width (colour and wide char aware) [duplicate]

I have the alias: trunc='cut -c -${COLUMNS:-80}' This works just dandy when text doesn't contain colours and wide characters. I could play with tput rmam and tput smam, but these don't actually ...
Tom Hale's user avatar
  • 31.2k
0 votes
0 answers
65 views

BASH: Is there a way to READ the current foreground and background color in use? Not CHANGE them... just see what the user is using NOW? [duplicate]

Some background for any who find this later This is a question about colors being applied in the shell. NOT about how to CHANGE said colors (there's a bajillion answers for that). But how to READ them....
NerdyDeeds's user avatar
0 votes
1 answer
196 views

Effect of dircolors

What does dircolors affect. Is it for the ls command only ? Should dircolors be called before defining alias ls='ls --color'?
Vera's user avatar
  • 1
7 votes
1 answer
3k views

Getting italics working correctly in tmux

I have an issue that the colors and font don't get produced correctly in tmux. The same output looks different when the command is run outside vs inside tmux. Outside tmux: Inside tmux: As suggested ...
Abhilash's user avatar
  • 359
1 vote
1 answer
50 views

Is it possible for a program to get what colors are being used in terminal? [duplicate]

In terminal I use a white on black. A program appears to expect black on white text or something like that. Because of the use of color to highlight important commands, they force regular text to be ...
traisjames's user avatar
0 votes
1 answer
68 views

Font Effects in 8-Bit and 24-Bit Colour Representations

I want to use 8-Bit and 24-Bit colours in terminal, and have seen some different versions. code="\e[38;5;${if}m" code="\e[38;5;${ir};${ig};${ib}m" I am unsure about the second ...
Vera's user avatar
  • 1
2 votes
2 answers
2k views

zsh: How to change the color of all invisible file names in the Mac's Terminal?

I'm using a Mac Silicon with the Ventura MacOS. In the Terminal app, all the file names have the same color. Take note that the default shell is zsh in Ventura, and is the one I want to use. ...
Cham's user avatar
  • 123
0 votes
1 answer
267 views

colorizing commands vs arguments in output of shell

When working with make/cmake scripts you often have to use VERBOSE=1 and look at all the commands run. This is what I do a lot, and its utterly straining for someone just looking for the origin of ...
Kalen White's user avatar
1 vote
1 answer
368 views

set colored-stats ignores $LS_COLORS

Problem Bash <tab> autocompletion ignores $LS_COLORS variable and uses default color values. Setting I have a dircolors file and just the following declarations in .bashrc: eval `dircolors $HOME/...
Karolis Koncevičius's user avatar
3 votes
1 answer
568 views

How to retain color output with custom zsh function?

I am setting up a zsh shell environment and I wanted to try writing a simple function for my own learning purposes: # ~/.zsh-extensions/conda_which # get version in conda env function conda_which { ...
SumNeuron's user avatar
  • 215
1 vote
1 answer
32 views

Concatenating string passed into a control sequence

I have this echo invocation that prints a blue bar in a Bash terminal: echo $'\e[48;2;0;0;255m \e[0m' I would like to pass some variables to it, something like (this doesn't work): ...
user73235's user avatar
2 votes
1 answer
90 views

How can I re{duce,move} the Angry Fruit Salad effect [duplicate]

Above, you can see the output of the kscreen-doctor -o command on Suse Tumbleweed. I tried kscreen-doctor -o | cat to no avail. Short of using a black background as a damage limiting device (still ...
gboffi's user avatar
  • 1,454
0 votes
2 answers
112 views

Not enough arguments for capability `setaf` in OpenBSD

I want to change the text colour in a shell. I can use tput to get the correct escape codes. For example, echo "$(tput setaf 5)My text$(tput sgr0)" outputs My text in a pink-ish tone. This ...
FWDekker's user avatar
  • 101
1 vote
4 answers
3k views

How to "enable" True Color Support and Nerd Fonts in Arch Linux Console

From now on, every time I say "console" I refer to the console you must use in Arch Linux if a desktop environment is not yet installed. I want to "enable" True Color Support in ...
Jimmy Zeng's user avatar
0 votes
1 answer
69 views

Colouring lines in bash variable

I have the following bash function which prints lines from a string variable using colour. I want to use wl="1,5,8" so that lines 1, 5, and 8, are coloured in white. How can I do this? kls ...
Vera's user avatar
  • 1
3 votes
1 answer
283 views

How do I enable colours by default for common utilites in PowerShell on (Gentoo) Linux?

I'm currently running Gentoo Linux and have installed PowerShell (app-shells/pwsh-bin) as I am a contrarian. That being said, I am unable to obtain colour by default when running certain commands. ...
JJ Marr's user avatar
  • 33
0 votes
0 answers
56 views

Colouring a bash print statement

I have the following bash print statement which I want to colour blue. local -r sgr="$( tput sgr0 )" local -r wht="$( tput bold; tput setaf 15 )" local -r blu="$( tput bold; ...
Vera's user avatar
  • 1
0 votes
1 answer
55 views

Bash function printing certain lines blue

Am having difficulty understanding the following function. It is supposed to colour lines starting with - or with {- using blue. How are not matching lines still printed? kls () { rst='tput sgr0' ...
Vera's user avatar
  • 1
0 votes
0 answers
262 views

Color Code Specific Words/Phrases in a Unix/Linux Terminal Regardless of the Command Used that Prints that Word/Phrase

Is there a way in Unix/Linux to always color-code specific words/phrases no matter what made those words/phrases appear as output on the terminal? I know you can write scripts/programs to print out ...
Sacred's user avatar
  • 1
2 votes
0 answers
65 views

Why typing long string into read input with color misbehaves? [duplicate]

I can't seem to move my cursor to the beginning of colored read input when I'm typing a really long string. This below gif shows exactly that, the cursor just stuck on there and I can't move it to ...
Liso's user avatar
  • 131
0 votes
1 answer
199 views

My fish prompt gets messed up when I add more set_color

I've been trying to make a custom fish prompt, but there's one problem that I can't seem to figure out how to fix. I got this to work, but it's not exactly what I want, as I want the ash@cat-box to be ...
Ash's user avatar
  • 1
2 votes
0 answers
157 views

Watch command -d=cumulative gives unexpected behavior with --color

This script gives the expected behavior, highlighting the parts of the date that change: watch -d=cumulative date However this script highlights the entirety of the text instead of just the things ...
Jake's user avatar
  • 21
1 vote
1 answer
1k views

echo -e \e does not print an escape from bash script on macos

I just moved to Mac. I'm using a shared shell script that's running in bash. The script itself works, however it is written to produce colored output, and that is broken. Here's the first two lines ...
Matthias's user avatar
  • 111
3 votes
1 answer
3k views

xrandr: change saturation (less color, more black/white)

I know how to change brightness and gamma with xrandr: xrandr --output eDP1 --brightness 0.8 --gamma "0.90:0.85:0.80" but how can I change saturation, ie decrease the amount of color and ...
Martin Vegter's user avatar
0 votes
2 answers
320 views

convert xterm256 to ansi

I have a program that will only accept ANSI color input but I have reason to feed it the output of a program that outputs xterm256 color codes. Is there a converter? I realize of course that color ...
Ray Andrews's user avatar
  • 2,527
2 votes
1 answer
411 views

How to edit $PS1 variable so that the output of a bash command is another color than the command?

How to edit $PS1 variable so that the output of a bash command is another color than the command? For example, I want the command to be black, and the output to be green. username$ seq 1 3 1 2 3 In ...
Maria A's user avatar
  • 21
0 votes
3 answers
236 views

Linux 9 commands send ANSI/color sequences to monochrome terminal

I'm using a Wyse50 Terminal emulation on Rocky Linux 9. Man pages, help screens, etc., are unusable because the system outputs attribute and color codes that the terminal emulator doesn't understand;...
Darrel Barton's user avatar

1
2 3 4 5
18