As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [terminal-color]

The tag has no usage guidance.

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

How can I change the colors used in CMake-generated Makefile messages? [duplicate]

I have a somewhat lower capability of telling apart dark(er) blue from black on a monitor. Unfortunately, when CMake-generated Makefiles report the generation of an atypical target, they often/always ...
einpoklum's user avatar
  • 115k
1 vote
1 answer
129 views

Issue with MinTTY/MSYS2/bash and sbt showing control characters / no rich text output

A recent update (of either MinTTY/MSYS2/bash or sbt) started breaking the output of sbt such that control characters are appearing instead of displaying rich text output in the terminal: From the ...
Daniel's user avatar
  • 8,499
3 votes
1 answer
908 views

How to Detect If Current Terminal Supports 16-Color or 256-Color in Go?

We got many popular packages in Go to render colorized text in terminal, like fatih/color, gookit/color, lucasb-eyer/go-colorful. However I'm facing a problem that --- apart from seeing with my own ...
Wu Shanhe's user avatar
1 vote
1 answer
197 views

terminal background turn gray when open in vim

I'm using vim in zsh in wsl, playing with it's color setting. I want to use colorscheme solarized for my vim, but it caused the background of terminal color to gray (open in vim by using :ter) How can ...
jteng2127's user avatar
1 vote
1 answer
1k views

How to force the output color of echo to follow colors defined in bash script?

I am using ANSI escape codes in my bash script to change the color of echo commands #/bin/bash cecho() { local code="\033[" case "$1" in black | ...
Sachin's user avatar
  • 1,197
3 votes
2 answers
561 views

How to show colors in string generated by json.dump?

for example: data = {'\u001b[31mKEY\u001b[0m': 'value'} print(json.dumps(data)) Generated string will be escaped and color codes will be printed as is. Even json.dumps(data, ensure_ascii=False) ...
aiven's user avatar
  • 3,685
1 vote
1 answer
1k views

How do I get a terminal to display colors on CentOS 7 when viewing Git changes.? This is not Git Bash this is just a terminal window

Can someone direct me to how I can get the color coding option in CentOS for Git? Is there a specific version that is needed to get this color coding highlight when under the terminal (either ...
edjm's user avatar
  • 4,746
2 votes
2 answers
420 views

comparing lists and highlight the key elements

from colorama import Fore, init init() key_numbers = [1,3,5,7,9] numbers = [3,4,6,3,8,9,7,9,3,1] for number in numbers: if number in key_numbers: number1 = Fore.RED + number ...
Kapilan Navaratnam's user avatar
3 votes
1 answer
322 views

Node.js cluster; jumbled console output ONLY when using colour

Нello! I'm running a clustered node project with a number of nodes. They do a fair bit of console output. I also want to be able to do beautiful coloured output. My problem: I'm getting jumbled, race-...
Gershom Maes's user avatar
  • 7,108
5 votes
3 answers
2k views

How to restore terminal color to default after spring boot banner has printed

Spring boot offers a configurable banner via banner.txt that supports color, eg ${AnsiColor.RED} __ __ ____ _ ____ | \/ |_ _ | _ \ ___ __| |...
Bohemian's user avatar
  • 409k
2 votes
2 answers
268 views

How to enable color when using cmd or linux terminal on a file?

How do I enable color in Julia when I am not using the REPL? When I try and run my Julia script on the Linux terminal it doesn't show colors. Also another quick question. What's the best way to run a ...
CVasquezG's user avatar
  • 447
3 votes
0 answers
1k views

How to capture colored terminal (ANSI) output and log it preserving colors

I had a need to capture the colored output of a long-running command line program, so I could easily share it with colleagues. Specifically, I'm running vagrant up, which generates colorful and useful ...
TonyH's user avatar
  • 1,115
1 vote
3 answers
12k views

awk: bailing out at source line 1

I'm looking to get some colorized log output and don't want to use multitail. The command I'm trying to execute is: tail -100f some_file.log | awk '/INFO/ {print "\033[32m" $0 "\033[39m"} /Exception/...
icfantv's user avatar
  • 4,503
1 vote
1 answer
1k views

How to make bash command echo lines green

I have a bash script with command echo turned on (set -x). I want the echo lines to be printed in green text, but the output of the actual commands to be in whatever the default color is. I can use $...
Ari's user avatar
  • 3,440
1 vote
0 answers
73 views

Are there conventions on which color combinations go well together?

Most terminal color palettes have colorschemes that are customizable. Many terminal users make use of some standard colorscheme such as solarized. I'm building a terminal application that needs to ...
chtenb's user avatar
  • 14.8k
2 votes
4 answers
3k views

How do I convert DOS ANSI (CP 437) files to Unix ANSI with Unicode?

ANSI files from http://blocktronics.org/ seem to be using another ANSI encoding than the one supported in my VT100 terminal emulator. If I view those files with tetraview, they look decent. But if I ...
Janus Troelsen's user avatar
1 vote
1 answer
333 views

Preserve colored output using php's popen

When using popen in php, is there a way to preserve the colored output a program might generate? Is there maybe a way I can tell the shell to print all color escape sequences, instead of resolving ...
DudeOnRock's user avatar
  • 3,635
7 votes
2 answers
3k views

How to log a colored message with Yeoman?

I have tried console.log('message'), but it returns the message in black. Is there a way to log a message in color in a generator?
benoit's user avatar
  • 157
1 vote
1 answer
1k views

TerminalColours not loading in OS X Terminal [closed]

I've installed SIMBL and downloaded TerminalColors, then copied this bundle to Plugins directory to SIMBL/Plugins. Everytime I started the Terminal, the following message was shown: Terminal 2.3 (...
felipe.zkn's user avatar
  • 2,004
2 votes
1 answer
2k views

Why the echo result of $vcs_info_msg_0_ contains strange characters in zsh?

This is my PROMPT configuration in zsh: PROMPT=$' %{$purple%}%n%{$reset_color%} at %{$orange%}%m%{$reset_color%} in %{$limegreen%}%~%{$reset_color%} $vcs_info_msg_0_ $ ' And this is how my zsh ...
Reorx's user avatar
  • 2,771
7 votes
4 answers
6k views

How do I change the color of current cursor position indicator?

when I open a terminal I have a black background with white characters. I also have a green placeholder that indicates to me where currently is the cursor. This behaviour is the same during any perl ...
Zagorax's user avatar
  • 11.4k
2 votes
1 answer
1k views

Coloring compiler diagnostics with SCons

I am currently using the colorama package to color messages generated by my build scripts. I have also used scolorizer, which replaces the build commands with custom, colored messages using ...
makes's user avatar
  • 6,428
2620 votes
33 answers
1.8m views

How to change the output color of echo in Linux

I am trying to print a text in the terminal using echo command. I want to print the text in a red color. How can I do that?
satheesh.droid's user avatar
2 votes
3 answers
1k views

Can one highlight tab characters in the terminal?

Using terminal sequences, I can colour text in a terminal emulator: $ echo -e '\e[37;41m--this is white on red--\e[0m' And this works. The following prints a red rectangle, i.e. space characters ...
Dhskjlkakdh's user avatar
  • 11.1k
8 votes
3 answers
7k views

Converting ANSI escape sequences to HTML using PHP

This is a similar question to this one. I would like to convert ANSI escape sequences, especially for color, into HTML. However, I would like to accomplish this using PHP. Are there any libraries ...
Travis Beale's user avatar
  • 5,514
93 votes
3 answers
35k views

A library to convert ANSI escapes (terminal formatting/color codes) to HTML [closed]

I'm looking for a code library that converts ANSI escape sequences into HTML color, via plain tags or CSS. For example, something that would convert this: ESC[00mESC[01;34mbinESC[00m ESC[01;...
Myrddin Emrys's user avatar