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
20 views

set colored-stats ignores $LS_COLORS

Problem Bash autocompletion ignores $LS_COLORS variable and gets color values from someplace else. Setting I have a dircolors file and just the following declarations in .bashrc: eval `dircolors $...
2 votes
1 answer
34 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 { ...
  • 205
1 vote
1 answer
28 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): ...
2 votes
1 answer
54 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 ...
  • 1,086
0 votes
2 answers
53 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 ...
  • 101
0 votes
2 answers
151 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 ...
0 votes
0 answers
25 views

How to interpret linux frame buffer pseudo color palette

I am trying to write a custom pseudo color palette to use with linux frame buffer. To write color palette I use the fb_cmap structure and IOCTL call ioctl(fp,FBIOPUTCMAP,&ocmap); in my C code. I ...
  • 1
0 votes
1 answer
51 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 ...
  • 83
1 vote
1 answer
69 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. ...
  • 13
0 votes
0 answers
28 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; ...
  • 141
0 votes
1 answer
26 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' ...
  • 313
0 votes
0 answers
36 views

Mobaxterm terminal color scheme cursor only

I have mobaxterm set up to try and look as close to ubuntu GNOME terminal "Tango" as possible. The background color looks good. However I noticed that setting the foreground color takes over ...
  • 452
0 votes
0 answers
21 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 ...
  • 1
1 vote
0 answers
41 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 ...
  • 111
0 votes
1 answer
17 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 ...
  • 1
2 votes
0 answers
34 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 ...
  • 21
1 vote
1 answer
175 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 ...
  • 111
3 votes
1 answer
479 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 ...
0 votes
2 answers
72 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 ...
  • 2,025
2 votes
1 answer
79 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 ...
  • 21
0 votes
3 answers
136 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;...
0 votes
0 answers
40 views

Mapping colors in KDE Konsole to elements of Vim formatting

I seem to be struggling with this for quite a while, and always it is trial and error. I need to know the mapping between different elements of formatting in Vim (for instance, the font color of the ...
  • 424
1 vote
0 answers
196 views

What are the color options in tcsh?

I was recently required to move to the tcsh shell and I was wondering about colors. Especially what is the difference between the following: setenv CLICOLOR 1 set color set colorcat Which one do I ...
user avatar
2 votes
2 answers
82 views

Bash function colouring from string input matching regex

I have a multi-line string that I use for printing in a bash script. docstring=" Headings -H, -H CNT, -H=CNT, -HCNT, --heading CNT, --heading=CNT Warnings -W, -W CNT, -W=CNT, -WCNT, --...
  • 25
0 votes
1 answer
141 views

Change colors of the linux console (not the emulator) [duplicate]

I would like to change the default colors used by the terminal (in particular the blue that is difficult to read with black background). How can I achieve that result? I know this has been asked a lot,...
  • 11
0 votes
1 answer
15 views

Split lines (like fmt -w) but on coloured / formatted command line output

I have output from a command (jest, for running automated JS tests) that uses fancy terminal codes to do things like coloured text in its output. I want to trim any very long lines because I run jest ...
0 votes
0 answers
34 views

Linux suddenly got this purple colour when I booted it up yesterday and I don't know why

I simply booted up my Linux and for some reason not only were the words in the loading screen all purple how so was everything else. The background had a purple shading, the icons had a purple shading,...
0 votes
1 answer
25 views

Need help determining what causes Zypper --no-color option to be ignored

When I issue zypper --no-color update -y I can still see ANSI codes. Here is a sample of the log: Retrieving package glibc-extra-2.31-150300.41.1.x86_64 ...
1 vote
1 answer
108 views

Why does TERM variable not reflect True Color support in terminal emulators

So using the st terminal emulator the TERM variable is set to st-256color, even tput colors gives me 256. But from multiple sources and the tests I have run, it seems like ST does support TRUECOLOR. ...
2 votes
1 answer
376 views

How to remove color from print to make it suitable for piping

I'm piping some Unix commands with my own scripts. The problem is that in my scripts, I'm using colors. Like for example: yellow=`tput setaf 3` reset=`tput sgr0` function Warning() { echo "${...
4 votes
1 answer
130 views

ls command still reads the default configuration even after setting the LS_COLORS

I know there are several related questions asked about this but I could't solve my problem with those. Expected behavior: What I want is to disable all coloring stuff and just make the directories ...
  • 155
7 votes
2 answers
970 views

ANSI terminal color behaves strangely

I am encountering strange behaviour when trying to switch on and off background colors in terminal output: #!/bin/sh printf "\e[48;5;203m" printf "AAA\n" printf "\e[0m" ...
0 votes
0 answers
55 views

nvim colorschemes doesn't work as expected with urxvt terminal

hello my terminal (urxvt) is working well, but it has one problem with vim's colorschemes. it displays a weired colors, not like other terminal (xfce4-terminal). i look for the problem and i found ...
  • 1
-1 votes
1 answer
436 views

How can I have colored emoji in URxvt?

Let me first clarify that xfce4-terminal does show colored emojis on the very same system for which I ask the question. URxvt, on the other hand, doesn't show them. Based on archlinux wiki, Emojis ...
  • 1,175
16 votes
2 answers
1k views

How can I keep colouring when piping man to less?

I have this in my .zshrc file export MANLESS="" export LESS="--RAW-CONTROL-CHARS" export LESS_TERMCAP_mb=$(tput bold; tput setaf 5) export LESS_TERMCAP_md=$(tput bold; tput setaf 1)...
1 vote
0 answers
26 views

color Python’s uncaught exception tracebacks using grc / grcat

I am using grc colorizer, ie: cat file | grcat conf.myconfig which basically colors the output of file based on my coloring rules conf.myconfig. How can I use grc for automatically coloring uncaught ...
0 votes
1 answer
97 views

Have git diff color customization

How can git diff color be changed to one's disposal, or such as for diff ...? in ~/.gitconfig: [color "diff"] added = yellow changed = red bold not work. Please sincere help appreciated
0 votes
1 answer
856 views

Terminal Coloring using ZSH

I have seen several other users terminals that are very colorful, even the terminal for Parrot OS is extra colorful now. I am using zsh on Kali, just FYI, this there a way to create your own color ...
2 votes
2 answers
956 views

Text color using $'...', $"...", '...', and "..."

For as long as I can remember, I've personally used the following method for changing the color of output text when using bash: red=$'\033[1;31m' ...
0 votes
1 answer
51 views

Change terminal color theme to black ink on white paper in Q4OS

I am using the Q4OS linux. The terminal has a dark theme with black background and white ink. I would like to have black ink on white background in the terminal. I have found a partial solution by ...
0 votes
0 answers
14 views

Seeking CUPS filter to convert gray to black

I get a lot of documents containing color for no good reason. I want them printed in solid black with no gray. I see some questions about this here along with some printer-specific suggestions, but ...
  • 121
2 votes
0 answers
234 views

Set different color schemes for different applications in GNOME Terminal?

In the GNOME Terminal, the default scheme for text and background colors is the system theme, which on Red Hat seems to be just a slightly darker variant of the built-in scheme Tango dark. This works ...
0 votes
1 answer
224 views

How to get color in terminal but no color in output file [duplicate]

To show output in both terminal and to a file, tee can be used like below ls --color=auto | tee opfile But now, there is no color in the terminal. If I force colors, opfile also has colors which ...
  • 4,217
2 votes
2 answers
989 views

True color support in TTY

I'd like to know if there's any way to get true color support in the tty. To be clear, I don't mean a terminal emulator, I mean the actual tty you get when no display server is running.
0 votes
1 answer
49 views

Resetting color in end of PS1 resets commands colors in MirBSD KornShell

I have \033[0m color code in the end of my PS1 prompt for resetting, so what I enter won't be colored. But when I used ls I saw that its colors don't work - everything is white. Same for other ...
3 votes
1 answer
774 views

journalctl output disable colorization

I have a dark background for my console so there's quite a bit of journalctl output that is unreadable. I see lots of information about how to add color! But how do I completely disable it?
2 votes
2 answers
437 views

stdin/stderr redirection, piping and color

I've seen a zillion permutations on this question but I think none is an exact duplicate. Can I copy only stderr (or eventually stderr and stdin) to a file, while keeping the colorized output on the ...
0 votes
0 answers
48 views

Color management / profiles in a virtual machine under Linux

I have some photo editing software that I intend to run on a Windows VM, with the host being Ubuntu. I already read about color management for the Ubuntu OS itself and I think I managed to set up the ...
0 votes
2 answers
83 views

Kubuntu: how to disable color in output of 'watch' command

I am runnung Kubuntu 20.04. Command watch is from package procps. dpkg -l procps shows the version: 2:3.3.16-1ubuntu2 I am redirecting the output of warch to a file, like watch -t "date" &...
0 votes
0 answers
39 views

xterm ignores xrdb state unless loaded twice

When I boot up i3, my xterm will be colored and configured as though my Xresources haven't been loaded yet, with default values for everything, but when I query the resource database, all my values ...
  • 11

1
2 3 4 5
18