Questions tagged [colors]

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

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

How to have colors on qemu curses?

I'm using Arch, and i am emulating a virtual operating system (Linux) with qemu (qemu-system-x86_64), but this system has no colors (calling escape sequences directly doesn't work either, not even "...
1
vote
1answer
34 views

tmux 256-color output on 256-color terminal, 8-color output on 8-color terminal

I would like for tmux to automatically pick up 256-color mode, i.e. have an environment variable TERM=tmux-256color inside tmux when the environment variable TERM=xterm-256color was set outside. ...
1
vote
1answer
13 views

Coloring output different in MOTD and run-parts

Trying to color my command output, I am stuck in understanding the difference between logging into my machine and seeing the MOTD running run-parts on /etc/update-motd.d/ I created this test-script ...
1
vote
1answer
25 views

Colorize options in all helps' commands

I have output of sed command as below: sed --help Usage: sed [OPTION]... {script-only-if-no-other-script} [input-file]... -n, --quiet, --silent suppress automatic printing of ...
1
vote
2answers
53 views

Generate a color code from an arbitrary string

I want my shell prompt to have a different, unique, consistent color automatically based on the hostname of the server. For example, when I log in to a particular server, the prompt should be a ...
1
vote
2answers
51 views

ls: use different color for “user” and “group” columns, when file owned by root

When using ls -lAhF, the 3rd and 4th columns are user and group ownership, ie: drwxrwxrwt 2 root root 60 Nov 15 15:50 .X11-unix/ srwxr-xr-x 1 marti marti 0 Nov 15 15:51 .menu-cached-:0-marti= ...
-5
votes
1answer
57 views

What is the 38;5 sequence in $PS1?

I tried to find info online, but I could not find any. It seems that many people use a specific sequence of numbers, without actually providing any explanation why. More specifically, my $PS1 in ...
0
votes
1answer
161 views

How does one have custom LS_COLOR work for ZSH?

I wanted to make custom colors for the ls command with zsh, but I find that all the previous answers to this do not work for me. I tried all these options: Option 1) #LS_COLORS='no=00;37:fi=00:di=...
1
vote
2answers
52 views

red terminal font when root

I'd like to make happen in RHEL/CentOS 7.6 anytime you do su and become root I want the terminal prompt color in that terminal to become red for the duration of that su session. Type exit to go back ...
0
votes
0answers
37 views

Ansi 40 (Black Background) does not work in WSL using Windows Terminal

Not sure if this is the right place to ask, but i'm trying to run ArchWSL with Microsoft Terminal and to style it as I have my actual Arch instalation. I'm trying to "port" base16 Flat Light to the ...
0
votes
0answers
29 views

background colors in terminal emulators

I am experiencing strange terminal behavior on two different machines with two different terminator versions: The program that creates these colourings is grc (generic colouriser). grc is written in ...
8
votes
2answers
958 views

Setting PS1 color

I'd like to color my zsh prompt. To do that, I use the following code: export PS1=%F{blue}%n%# but to have it right, I have to add %f to the PS1 value like so: export PS1=%F{blue}%n%#%f When ...
0
votes
1answer
65 views

Color string in terminal in zsh

I'm trying to convert this string that I had in .bash_profile PS1="[\e[37;1m][\u:\w]$ [\e[0m]" to an equivalent string in .zprofile in zsh. I've read the guide in https://wiki.archlinux.org/index....
3
votes
1answer
253 views

In 2019, is it safe to assume that all terminals understand ANSI escape codes?

From what I know, a well-behaved command-line program should examine the $TERM environment variable get the name of the terminal emulator, look up its entry in the terminfo database, and then use ...
1
vote
0answers
54 views

bash colored completion doesn't obey LS_COLORS environment variable

In bash, I have colored output set up for commands such as ls. I customized the exact colors used with the LS_COLORS environment variable, since the default ones were kind of ugly. From what I ...
1
vote
1answer
34 views

Why is default Dialogrc file making screen monochrome?

I have a bash script where I have the following code: if [ ! -f /home/tools/test.dialogrc ] then dialog --create-rc "/home/tools/test.dialogrc" fi Which successfully creates a test.dialogrc file ...
2
votes
0answers
39 views

Colorize the PS4 prompt?

With the option set -x, each command is echoed to STDERR before execution, prefixed by the expanded $PS4, with the first character being repeated according to the call stack depth. I want the output ...
0
votes
2answers
60 views

How can I brighten up blue directories in ls --color?

I see one other Dark blue color...-Q with the same problem: Instead of two kinds of blue (normal and bright/bold) I have only one, very hard-to-read so-called "bold blue". Normal blue is even worse, ...
0
votes
1answer
44 views

Who is setting my LS_COLORS?

I'm using the bash shell, and want to change some of my ls listing colors; I've noticed that this can be controlled using the LS_COLORS environment variable, which encodes terminal colors for various ...
1
vote
1answer
108 views

lolcat + motd = no colours

I can't get lolcat to show colours in the message of the day (motd). When I run this in the command line, all works fine: exec /usr/games/fortune | /usr/games/cowsay -f moose | /usr/games/lolcat ...
1
vote
1answer
60 views

What does 'mustard color' highlighted directories mean?

When I run 'ls -laGp' command in macOS some of the folders are highlighted with this color. What does that mean? I researched but couldn't find any documentation or anything. If you let me know ...
0
votes
0answers
23 views

Change color in xterm via control sequence directly

This - I have to call it sleep mode session - I dumped from xterm: It started with this Why I can't send escape sequences from keyboard, but can do it from another tty? and Echoed escape ...
0
votes
1answer
58 views

Change default terminal color

I often have several SSH terminals open on different servers, and I am looking for a way to keep track of them more easily. I use MacOS Terminal app. I have already customized the prompt on each ...
1
vote
0answers
46 views

What are the colors[0..15] used for in xterm?

In the configuration files of XTerm (e.g. /usr/share/X11/app-defaults/ or ~/.Xresources) you can configure values for the variables color[o..15]. The question is: What is colorX used for? So far I ...
2
votes
1answer
40 views

X11 “eyedropper” application to inspect pixel color?

Is there an application I can use to obtain the RGB values of a particular pixel on the screen? I'm thinking something similar to paint programs where you can use an "eyedropper" to sample a color.
0
votes
0answers
14 views

Fedora Cinnamon, mint-y-dark-aqua: change text color desktop icons

I have switched to mint-y-dark-aqua themes; when I try to change a name of file or folder on the desktop, the color of text switch to a light grey and, over a white background, I'm unable to see fonts....
0
votes
0answers
31 views

How can I change the color scheme/theme of groff-mom?

I know how to change individual macro's colors, but is there a way to globally change all the colors to a different color scheme/theme? I am using groff-mom. Example: It currently looks like this I ...
0
votes
1answer
28 views

ls colors showing unicode replacement character

On Solaris 11.4 when I try to use ls with colors in an SSH session, the output is correctly colored but there is a question mark in a box at the end of every line like this. I tried ssh from both ...
2
votes
1answer
68 views

How to add colour to /etc/sudoers.lecture

Having set a lecture with Default lecture=always and Default lecture_file=/etc/sudoers.lecture, I would like to add colour to it. ANSI escape characters show without escaping, and creating a wrapper ...
0
votes
0answers
18 views

Is there a way to prevent bash-completion using “broken link” colours?

If you set up colored-stats so that you get coloured tab complete for (for example) cd (see question) then it also sets colouring for other tab completion like git and docker sub-commands. This is ...
1
vote
0answers
78 views

Emulating Synesthesia: How to change the colour of words based on the first letter in a system-wide manner?

I want to try to understand how Daniel Tammet, an autistic synesthetic savant, sees words, at least in the aspect of them having colour. To this aim, I want to colour every word appearing on the ...
0
votes
1answer
31 views

How to turn colors for vim.tiny without internet access?

readlink -f 'which vi' output: /usr/bin/vim.tiny vi --version output: VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 17 2016 07:08:19) Included patches: 1-488, 576 Extra patches: 8.0.0056 ...
0
votes
0answers
33 views

Colored bash prompt and tab title

I cannot seem to get both a colored terminal prompt and the tab title to change at the same time. function tab_title() { local tab_replace="${USER}@${HOSTNAME}" local tab_orig="$PS1" ...
0
votes
0answers
24 views

Real-time color change in terminal (before user sends the command)

I could not find a better way to write the title, so sorry if it is not as specific as it should. For my case, I would like to make the first word (that we know it will be separated of the rest of ...
1
vote
1answer
343 views

bash echo color to textfile [closed]

How can I write colored text using bash? RED='\033[0;31m' GREEN='\033[0;32m' NC='\033[0m' greprc=$? if [[ $greprc -eq 0 ]] ; then echo -e "${GREEN} converged${NC}" >>log else echo -e "${RED}...
2
votes
1answer
110 views

How to fix konsole `\033[0m` not working start from second page of scroll?

I noticed konsole has problem to reset color on next page of scrolling, as screenshot below, run with command for i in {1..100}; do echo "$i"; echo -en '\033[1;42m ...
0
votes
1answer
38 views

How can I get ls filetype colors?

I'm working on a project that consists to recode the behavior of the ls command, I'm wondering if there is a way to get the exact colors ls uses for different filetypes to reuse them in my code, ...
-1
votes
3answers
56 views

Color line, but don't show the matched pattern [closed]

So i have this text: 2019/06/16 22:36:28 (UNIVERSE) * @{EE3F}Trytrytry sagt: @{F80F}going afk for a bit I want to color the whole line in red for example. Then remove the unecessary parts to: 22:...
1
vote
1answer
62 views

Convert image into 8-Bit color space?

Is there a way to use convert to transform an image into an 8-bit bitmap?
0
votes
1answer
30 views

Why don't I see escape sequences in redirected stream OR how is color output implemented? [duplicate]

When running ls in terminal, output is variously colored: AFAIK this colorasing is accomplished by espace sequences (vt). But running ls | hexdump -cC shows only characters and LFs. Redirection to ...
1
vote
2answers
431 views

Bash - print first line of textfile (csv) bold

I have a text (csv) file like this: Date:;Time:;Value:; 20181202;112044;38274658392; 20181207;121356;94843726283; 20181221;221012;93938272189; 20181230;071234;93736473783; 20190107;011022;27339393022;...
0
votes
0answers
39 views

colorchange in less status line

based on this, this and this questions I have tried to build a status bar with a dynamic part (line number, file name etc.) and a static part. (I am old and can't remember the useful shortcut all the ...
1
vote
2answers
30 views

Signal neovim to reread its configuration

I have a script with which I toggle between a dark and a light colorscheme. The terminal emulator I use (termite) rereads its configuration when receiving the signal USR1, so when toggling my ...
0
votes
1answer
143 views

Bash - ANSI color code for purple background with bold black text

What is the ANSI color code for a purple (or dark purple) background with black bold text (foreground). As an example, here is cyan with black bold text: echo -e "\e[30;1;46mExample\e[0m" After ...
0
votes
1answer
53 views

Why would a file have NO color code? [duplicate]

Two files in one of my directories are rendered as gray on PuTTy. Running ls -l --color=always | less shows a list with most file names preceded by ESC[01;32m But those two files do not. The ...
0
votes
1answer
353 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]\$ ...
1
vote
2answers
54 views

Debian detects printer family, but no double sided printing; colors are inaccurate

On Debian 9.8 I use a Canon PIXMA MG2555 printer. 1) A global driver for PIXMA MG2500 series printers has been installed automatically by GNOME. It seems that no more accurate driver exists, and I ...
3
votes
1answer
71 views

How do I decolourise a Linux terminal?

How do I get a totally mono terminal? Preferably from an environment variable or just a tweak such that all terminal programs are mono. I've tried this: export TERM=xterm-mono export LS_COLORS="" ...
0
votes
0answers
272 views

Terminal(kitty) colors altering vim color scheme

I'm using the base16 color schemes for both my terminal(kitty) and vim. However changing the color scheme of kitty results in the color scheme of vim changing into something similar. The relevant(I'...
1
vote
0answers
62 views

Color rm -i prompt messages

I'm looking for a way to apply custom colors to messages emitted by the rm -i command: ~ $ rm -i file.txt rm: remove regular empty file 'file.txt'? I understand that I need to redirect the stderr as ...