Terminal Palette Test Page

This is a tool to help visualize and test the contrast of terminal palettes with various common terminal applications that make use of colors.

Things that are not yet done on this page:

The source code for this page is hosted on the GNOME Gitlab, please send issues or merge requests there.

Table of Contents

Color test

This is just a a terminal window showing all the possible color combinations of foreground and background. It is not representative of any real applications, but it does let you see and measure the contrast of arbitrary color combinations, and visualize how different terminal emulations deal with bold/bright colors. The numbers shown in the row & column headers are ANSI escape codes. The first column is the terminal default background; the first two rows are the terminal default foreground (without and with bold).

One important thing to check here is if any color combinations that are high contrast on popular existing terminal emulations are low contrast with a new color scheme. In that's the case, there might be applications using that color combination which become more difficult to use. Pay particular attention to columns 40, 42, 44, and 47 as those are common background color choices. The bright background colors 100-107 are rarely used in applications, because they cannot be selected except on graphical terminals that support the 16-color (or higher) palette extensions.

          40  41  42  43  44  45  46  47  100 101 102 103 104 105 106 107
      gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
   1  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  30  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
1;30  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  90  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  31  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
1;31  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  91  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  32  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
1;32  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  92  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  33  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
1;33  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  93  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  34  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
1;34  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  94  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  35  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
1;35  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  95  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  36  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
1;36  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  96  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  37  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
1;37  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 
  97  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY  gY 

AlsaMixer

AlsaMixer uses a hardcoded light-on-dark UI and 8-color plus bold color addressing. It makes use of 75% shaded blocks as well, which might not render nicely in the browser depending on your font.

┌────────────────────────────── AlsaMixer v1.2.2 ──────────────────────────────┐
│ Card: SB Audigy 2 ZS [SB0350]                        F1:  Help               │
│ Chip: SigmaTel STAC9750,51                           F2:  System information │
│ View: F3: Playback  F4: Capture  F5:[All]            F6:  Select sound card  │
│ Item: Master [dB gain: -13.20]                       Esc: Exit               │
│                                                                              │
│     ┌──┐              ┌──┐     ┌──┐     ┌──┐     ┌──┐     ┌──┐     ┌──┐      │
│     │  │              │  │     │  │     │  │     │  │     ▒▒     │  │      │
│     │  │              │  │     │  │     │  │     │  │     ▒▒     │  │      │
│     │  │              │  │     │  │     │  │     │  │     ▒▒     │  │      →
│     │  │              │  │     │  │     │  │     │  │     ▒▒     │  │      →
│     ▒▒              │  │     │  │     │  │     │  │     ▒▒     │  │      →
│     ▒▒              ▒▒     ▒▒     ▒▒     ▒▒     ▒▒     │  │      →
│     ▒▒              ▒▒     ▒▒     ▒▒     ▒▒     ▒▒     │  │      →
│     ▒▒              ▒▒     ▒▒     ▒▒     ▒▒     ▒▒     │  │      →
│     ▒▒              ▒▒     ▒▒     ▒▒     ▒▒     ▒▒     │  │      →
│     ▒▒              ▒▒     ▒▒     ▒▒     ▒▒     ▒▒     │  │      │
│     ▒▒              ▒▒     ▒▒     ▒▒     ▒▒     ▒▒     │  │      │
│     └──┘     ┌──┐     └──┘     └──┘     └──┘     └──┘     └──┘     └──┘      │
│              OO                                                            │
│              └──┘                                                            │
│      60              50<>50   50<>50   50<>50   50<>50  100<>100   0<>0      │
│  < Master >  Tone     Bass     Bass    Treble   Treble    PCM      PCM       │
└──────────────────────────────────────────────────────────────────────────────┘

There's also a bunch of blue dialog windows. They're pretty consistent throughout, so I'm just showing the top of the Help dialog here.

┌────────────────┌────────────────── Help ───────────────────┐─────────────────┐
│ Card: SB Audigy│Esc     Exit                               ▒lp               │
│ Chip: SigmaTel │F1 ? H  Help                               ▒stem information │

Coreutils DIR_COLORS (ls)

I have included presets for the default colors shipped with GNU coreutils, along with the variation used by Fedora. (Note that Fedora uses a 256 color DIR_COLORS by default which ignores the terminal palette.) I have also included a proposed modification to improve contrast by using 16 color addressing.

$ ls -l
total 8
-rw-rw-r--. 1 cwalton cwalton    0 Apr 18 14:20 01_normal
drwxrwxr-x. 1 cwalton cwalton    0 Apr 18 14:11 02_dir
lrwxrwxrwx. 1 cwalton cwalton    9 Apr 18 14:11 03_link -> 01_normal
prw-rw-r--. 1 cwalton cwalton    0 Apr 18 14:12 04_fifo
srwxrwxr-x. 1 cwalton cwalton    0 Apr 18 14:13 05_sock
crw-r--r--. 1 root    root    5, 0 Apr 18 14:14 06_dev
lrwxrwxrwx. 1 cwalton cwalton   10 Apr 18 14:14 07_orphan -> missing
-rwSrw-r--. 1 cwalton cwalton    0 Apr 18 14:15 08_setuid
-rw-rwSr--. 1 cwalton cwalton    0 Apr 18 14:15 09_setgid
-rwxrwxr-x. 1 cwalton cwalton    0 Apr 18 14:16 10_capability
drwxrwxrwt. 1 cwalton cwalton    0 Apr 18 14:19 11_sticky_other_writable
drwxrwxrwx. 1 cwalton cwalton    0 Apr 18 14:20 12_other_writable
drwxrwxr-t. 1 cwalton cwalton    0 Apr 18 14:20 13_sticky
-rwxrwxr-x. 1 cwalton cwalton    0 Apr 18 14:20 14_exec
-rw-rw-r--. 1 cwalton cwalton    0 Apr 18 14:20 15_archive.tar
-rw-rw-r--. 1 cwalton cwalton    0 Apr 18 14:20 16_image.png
-rw-rw-r--. 1 cwalton cwalton    0 Apr 18 14:21 17_audio.opus

Gentoo Portage (emerge)

The package manager for the Gentoo distribution. It uses a lot of bold green, yellow, and red. The color selection is designed for use in a dark background terminal with bold using bright colors.

The command output shown below has been edited to remove output that's redundant for just seeing the colors.

# emerge --sync
>>> Syncing repository 'gentoo' into '/usr/portage'...
 * Using keys from /usr/share/openpgp-keys/gentoo-release.asc
 * Refreshing keys via WKD ...                                           [ ok ]
 * Trusted signature found on top commit
Updating files: 100% (12617/12617), done.
=== Sync completed for gentoo

Performing Global Updates
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  #='/var/db update'  @='/var/db move'
  s='/var/db SLOT move'  %='binary move'  S='binary SLOT move'
  p='update /etc/portage/package.*'
/usr/portage/profiles/updates/2Q-2016.................

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.

 * An update to portage is available. It is _highly_ recommended
 * that you update portage now, before any other packages are updated.

# eselect news read new
2020-04-22-python3-7
  Title                     Python 3.7 to become the default target
  Author                    Michał Górny <mgorny@gentoo.org>

# emerge -uDNav world

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U  ] sys-libs/glibc-2.31-r2:2.2::gentoo [2.30-r8:2.2::gentoo] USE="(
crypt) multiarch -audit -caps (-cet) -compile-locales -static-pie%" 16,326 KiB
[ebuild  NS    ] sys-kernel/gentoo-sources-5.6.7:5.6.7::gentoo [5.4.12:5.4.12::g
entoo, 5.6.3:5.6.3::gentoo, 5.6.4:5.6.4::gentoo, 5.6.5:5.6.5::gentoo] USE="-buil
d -experimental -symlink" 189 KiB
[ebuild   R    ] dev-lang/yasm-1.3.0::gentoo  USE="nls -python" PYTHON_SINGLE_TARGET="python2_7%*" PYTHON_TARGETS="(-python2_7%)" 0 KiB

Would you like to merge these packages? [Yes/No] 

>>> Running pre-merge checks for sys-libs/glibc-2.31-r2
 * Checking general environment sanity.
 * Checking that IA32 emulation is enabled in the running kernel ...     [ ok ]

>>> Emerging (1 of 41) sys-libs/glibc-2.31-r2::gentoo

(Read the compiler output that appears here to become a Linux expert overnight!)

git

git uses colorization in a few commands, but for the most part it only sets foreground colors. The palette assumes bold is bright.

$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   terminal-palette.css
	deleted:    wcag-checker.js

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   index.html

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	new-file

$ git show
commit 72cbdfcf0fc52e8226bb27a232752dad9c97b30b (HEAD -> master, origin/master)
Author: Calvin Walton <calvin.walton@kepstin.ca>
Date:   Fri Apr 24 11:42:32 2020 -0400

    An example commit

diff --git a/README.md b/README.md
index 1ba40e7..b51cf75 100644
--- a/README.md
+++ b/README.md
@@ -4,10 +4,10 @@ This is a tool to help visualize and test the contrast of terminal palettes with
 
 [Open in Browser](https://kepstin.pages.gitlab.gnome.org/terminal-palette/)
 
+Here is a new line!
 Please contribute additional terminal applications for testing!
 
 When you're developing this locally, not that you need to serve the application with a web server in order for the Javascript to load correctly.
-You can run a simple web server with a one-liner python command:
 
 ```
 python3 -m http.server --bind 127.0.0.1 --directory public 8000
$ git log --graph --pretty=oneline
(truncated to a section that demonstrates coloring)
| * | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f50b7daccc
bab2b9e3ef18f52a6dcc18ed2050b9 arm64: smp: fix crash_smp_send_stop() behaviour
$ git add --interactive
           staged     unstaged path
  1:    unchanged        +4/-0 README.md

*** Commands ***
  1: status	  2: update	  3: revert	  4: add untracked
  5: patch	  6: diff	  7: quit	  8: help
What now> h
status        - show paths with changes
update        - add working tree state to the staged set of changes
revert        - revert staged set of changes back to the HEAD version
patch         - pick hunks and update selectively
diff          - view diff between HEAD and index
add untracked - add contents of untracked files to the staged set of changes
*** Commands ***
  1: status	  2: update	  3: revert	  4: add untracked
  5: patch	  6: diff	  7: quit	  8: help
What now> p
           staged     unstaged path
  1:    unchanged        +4/-0 README.md
Patch update>>

htop - an interactive process viewer for Unix

A popular system monitoring tool used by Linux server admins. It has a mouse-enabled point and click interface, and a lot of customization options for layout, and several selectable color schemes.

In the Default and MC color selections, the CPU io-wait is shown as bold text over a same-color background, which is invisible unless bold is shown in bright colors. For some reason, the Light Terminal color selection explicitly sets the foreground to black rather than using the default, making it unreadable in dark terminals.

TODO: The color mapping on the window below isn't complete, some things are still missing colors.

1  [          0.0%] 5  [|         3.8%] 9  [|         3.8%] 13 [||        7.4%] 
2  [|         4.0%] 6  [|         4.0%] 10 [|         3.8%] 14 [|         4.0%] 
3  [          0.0%] 7  [          0.0%] 11 [          0.0%] 15 [||        7.7%] 
4  [|         3.8%] 8  [|         4.0%] 12 [          0.0%] 16 [||||     15.4%] 
Mem[||||||||||||||||||||   13.2G/31.4G] Tasks: 145, 1814 thr; 1 running         
Swp[||                      635M/16.0G] Load average: 0.48 0.52 0.56            
					Uptime: 12 days, 05:16:14               
    PID USER      PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command        
1431562 cwalton    20   0 4668M  898M  291M S 11.7  2.8 45:19.14 firefox        
1520899 cwalton    20   5 21972  5420  3152 R 11.7  0.0  0:02.54 htop           
1432528 cwalton    20   0 3908M  933M  273M S  7.8  2.9 10:00.16 /usr/x86_64-pc-
1432447 cwalton    20   0 3631M  706M  183M S  7.8  2.2 14:49.92 /usr/x86_64-pc-
1431783 cwalton    20   0 3186M  696M  280M S  3.9  2.2 15:48.91 /usr/x86_64-pc-
1431643 cwalton    20   0 11.1G 2076M 1265M S  3.9  6.5 20:57.02 /usr/x86_64-pc-
   1389 root       20   0 3160M  129M 78860 S  3.9  0.4  2h42:28 /usr/bin/X vt2 
   1590 cwalton    20   0 2689M 10700  7612 S  3.9  0.0 55:09.04 /usr/x86_64-pc-
1432556 cwalton    20   0 4123M 1089M  244M S  3.9  3.4 15:03.24 /usr/x86_64-pc-
   1608 cwalton    20   0 2689M 10700  7612 S  3.9  0.0 27:05.96 /usr/x86_64-pc-
1431702 cwalton    20   0 11.1G 2076M 1265M S  3.9  6.5  3:10.71 /usr/x86_64-pc-
1432531 cwalton    20   0 3908M  933M  273M S  3.9  2.9  1:06.60 /usr/x86_64-pc-
1431645 cwalton    20   0 11.1G 2076M 1265M S  3.9  6.5  1:56.39 /usr/x86_64-pc-
1432730 cwalton    20   0 32.8G  390M  105M S  3.9  1.2  0:36.64 /usr/x86_64-pc-
1431765 cwalton    20   0 11.1G 2076M 1265M S  3.9  6.5  0:19.19 /usr/x86_64-pc-
F1Help  F2Setup F3SearchF4FilterF5Tree  F6SortByF7Nice -F8Nice +F9Kill  F10Quit 

Alternate tree view:

      1 root       20   0  161M  5908  3928 S  0.0  0.0  6:13.89 /usr/x86_64-pc-
1822914 cwalton    20   0 1556M  157M 26264 S  0.0  0.5  6:26.92 ├─ evolution ca
1822923 cwalton    20   0 1556M  157M 26264 S  0.0  0.5  0:00.06 │  ├─ evolution
1822921 cwalton    20   0 1556M  157M 26264 S  0.0  0.5  0:00.00 │  ├─ evolution
1822918 cwalton    20   0 1556M  157M 26264 S  0.0  0.5  0:00.14 │  ├─ evolution
1822917 cwalton    20   0 1556M  157M 26264 S  0.0  0.5  0:00.00 │  └─ evolution

Help screen:

htop 2.2.0 - (C) 2004-2020 Hisham Muhammad                                      
Released under the GNU GPL. See 'man' page for more info.                       
                                                                                
CPU usage bar: [low/normal/kernel/irq/soft-irq/steal/guest/io-wait used%]       
Memory bar:    [used/buffers/cache                            used/total]       
Swap bar:      [used                                          used/total]       
Type and layout of header meters are configurable in the setup screen.          
                                                                                
 Status: R: running; S: sleeping; T: traced/stopped; Z: zombie; D: disk sleep   
 Arrows: scroll process list              Space: tag process                    
 Digits: incremental PID search               c: tag process and its children   
   F3 /: incremental name search              U: untag all processes            
   F4 \: incremental name filtering        F9 k: kill process/tagged processes  
   F5 t: tree view                         F7 ]: higher priority (root only)    
      p: toggle program path               F8 [: lower priority (+ nice)        

Settings panel:

Setup            Display options                                                
Meters           [ ] Tree view                                                  
Display options  [ ] Shadow other users' processes                              
Colors           [x] Hide kernel threads                                        
Columns          [ ] Hide userland process threads                              
                 [x] Display threads in a different color                       

Irssi Chat Client

When running in a terminal that supports it, irsii uses a 16 color palette (I believe it also has a fallback to 8 color plus bold). The palette, unfortunately for people using a light background, makes heavy use of light colors like cyan and yellow over the default background color. Many irssi users will end up customizing the color theme, however.

 Welcome to GNOME! Feel free to ask any question and be patient please. Bug repo
20:02  !irc.eagle.y.so *** Found your hostname
20:02 -!- kepstin-irssi [cwalton@dhcp-xxx-xxx-xxx-xxx.cable.user.start.ca] has 
	  joined #gnome
20:02 -!- Topic for #gnome: Welcome to GNOME! Feel free to ask any question and 
          be patient please. Bug reports are reported at gitlab.gnome.org
20:02 -!- Topic set by csoriano [] [Tue May 29 15:05:43 2018]
20:02 [Users #gnome]
20:02 [@borschty               ] [ luna                 ]
20:02 -!- Irssi: #gnome: Total of 380 nicks [2 ops, 0 halfops, 0 voices, 378 
	  normal]
20:02 -!- Channel #gnome created Mon Apr 13 16:23:13 2015
20:02 -!- Irssi: Join to #gnome was synced in 1 secs
20:05 -!- borschty_ [borschty@xxxxxxxxx.dyn.telefonica.de] has joined #gnome
20:05 -!- mode/#gnome [+o borschty_] by ChanServ
20:07 -!- borschty [borschty@xxxxxxxxx.dyn.telefonica.de] has quit [Ping 
	  timeout: 180 seconds]
20:37  * kepstin should have picked a different channel, this one is quiet!
20:40 < example> an example public message
20:43 < kepstin-irssi> my own messages have my nick in bold
20:49 < example> and people mentioning kepstin are yellow
20:59 -NickServ(services@gimpnet-services.gimp.org)- NickServ allows you to 
          register a nickname and
[20:11] [kepstin-irssi(+iw)] [2:gnome/#gnome(+fnrst [30c#C5,100m#m5,10n#N5]:15 
[#gnome]

The menuconfig tool is representative of many console applications that use a “dialog” style interface, including many Debian setup and system maintenance tools. It makes use of the 8-color palette only, and assumes that bold colors are bright. Some user interface details indicating boundaries of interface controls are invisible unless you enable the “Show bold text in bright colors” option.

Midnight Commander

One of the most famous “blue background” applications for Linux. Current versions of mc support 256 and truecolor addressing for themes, including directly accessing the 16 colors used by the default theme without relying on bold-is-bright.

  Left     File     Command     Options     Right                               
┌<─ ...walton/Projects/dircolors ─.[^]>┐┌<─ ...t/terminal-palette/public ─.[^]>┐
.n     Name       Size  Modify time ││.n     Name       Size  Modify time 
/..              │UP--DIR│Apr 18 14:11││/..              UP--DIRApr 24 12:10
/dir                   0Apr 18 14:11││ .index.html.swp │ 147456│Apr 26 01:00│
*01_executable         0Apr 18 14:20││ .termina~css.swp│  73728│Apr 26 00:22│
@02_symlink            6Apr 18 14:11││ .wcag-ch~.js.swp│  12288│Apr 25 11:26│
!03_stalelink          7Apr 18 14:14││ index.html        86504Apr 26 01:00
-04_device           5,0Apr 18 14:14││ terminal~tte.css  41750Apr 26 00:22
|05_special            0Apr 18 14:12││ tmcw-rel~ance.js   2501Apr 22 22:02
 06_temp.bak           0Apr 24 12:12││ tmcw-wca~rast.js   3446Apr 22 22:05
 07_archive.tar        0Apr 26 00:48││ wcag-checker.js    2725Apr 24 11:35
 08_doc.txt            0Apr 26 00:50││                 │       │            │
 09_source.c           0Apr 26 00:53││                 │       │            │
 10_media.opus         0Apr 26 00:55││                 │       │            │
 11_graph.jpg          0Apr 18 14:20││                 │       │            │
 12_database.db        0Apr 26 00:59││                 │       │            │
 core                  0Apr 26 00:40││                 │       │            │
├──────────────────────────────────────┤├───────── 3,446 B in 1 file ──────────┤
│UP--DIR                               ││ index.html                           │
└──────────────────── 186G/300G (62%) ─┘└──────────────────────────────────────┘
Hint: Need to quote a character?  Use Control-q and the character.
cwalton@saya ~/Projects/dircolors $                                          [^]
 1Help   2Menu   3View   4Edit   5Copy   6RenMov 7Mkdir  8Delete 9PullDn10Quit  
  Left     File     Command     Options     Right                               
┌<─ ...ent/termina┌──────────────────────────────────────┐l-palette/asdf ─.[^]>┐
.n     Name       User menu                     F2      Size  Modify time 
/..              Directory tree                       │UP--DIRApr 26 01:08
Find file                     M-?    ││       │            │
│ Swap panels                   C-u    ││       │            │
│ Switch panels on/off          C-o    ││       │            │
Compare directories           C-x d  ││       │            │
/..              │UP--DIR│Apr 26 01:08││/..              UP--DIRApr 26 01:08
                                                           
┌─────────────────── Configure options ───────────────────┐
│ ┌ File operations ────────┐ ┌ Other options ──────────┐ │
│ │ [x] Verbose operation   │ │ [x] Use internal edit   │ │
│ │ [x] Compute totals      │ │ [x] Use internal view   │ │
│ │ [x] Classic progressbar │ │ [ ] Ask new file name   │ │
│ │ [x] Mkdir autoname      │ │ [ ] Auto menus          │ │
│ │ [ ] Preallocate space   │ │ [ ] Drop down menus     │ │
│ └─────────────────────────┘ │ [x] Shell patterns      │ │
│ ┌ Esc key mode ───────────┐ │ [ ] Complete: show all  │ │
│ │ [x] Single press        │ │ [x] Rotating dash       │ │
│ │ Timeout: 1000000        │ │ [x] Cd follows links    │ │
│ └─────────────────────────┘ │ [ ] Safe delete         │ │
│ ┌ Pause after run ────────┐ │ [ ] Safe overwrite      │ │
│ │ ( ) Never               │ │ [x] Auto save setup     │ │
│ │ (*) On dumb terminals   │ │                         │ │
│ │ ( ) Always              │ │                         │ │
│ └─────────────────────────┘ └─────────────────────────┘ │
├─────────────────────────────────────────────────────────┤
│                   [< OK >] [ Cancel ]                   │
└─────────────────────────────────────────────────────────┘
                                                           
│                 │       │            ││                 │       │            │

Rust compiler

The Rust compiler (and the Cargo package manager that it's commonly used with) outputs fancy colored diagnostic messages. Annoyingly, the rust compiler uses 16-color addressing on supported terminals to explicitly select the bright cyan and green colors, resulting in poor contrast in light terminal themes. (Cargo uses bold dark cyan and dark green, which are fine when the “bold is bright” option is disabled.)

The output below combines the output from several different Cargo and Rust build commands to give an overview of how colors are used.

    Building [=======================================> ] 178/180: rustc_driver
   Compiling rust-example v0.1.0 (/home/cwalton/Development/rust-example)
warning: unused variable: `bar1`
 --> src/lib.rs:8:9
  |
8 |     let bar1 = &mut foo.bar1;
  |         ^^^^ help: consider prefixing with an underscore: `_bar1`
  |
  = note: `#[warn(unused_variables)]` on by default

error: unused variable: `x`
  --> src/main.rs:14:14
   |
14 |         E::A(x) | E::B(x) => {}
   |              ^         ^
   |
note: lint level defined here
  --> src/main.rs:2:9
   |
2  | #![deny(unused_variables)]
   |         ^^^^^^^^^^^^^^^^
help: consider prefixing with an underscore
   |
14 |         E::A(_x) | E::B(_x) => {}
   |              ^^         ^^


error[E0499]: cannot borrow `foo.bar1` as mutable more than once at a time
  --> src/lib.rs:8:17
   |
7  |     let bar1 = &mut foo.bar1;
   |                ------------- first mutable borrow occurs here
8  |     let _bar2 = &mut foo.bar1;
   |                 ^^^^^^^^^^^^^ second mutable borrow occurs here
9  | 
10 |     *bar1;
   |     ----- first borrow later used here


error: aborting due to previous error

Some errors have detailed explanations: E0499, E0507.
For more information about an error, try `rustc --explain E0499`.
error: could not compile `rust-example`.

To learn more, run the command again with --verbose.

tmux - a terminal multiplexer

tmux uses a green status bar with black text by default.

The multi-pane view uses green to highlight the selected pane.

pane 1                                  │pane 2
                                        │
					├───────────────────────────────────────
					pane 3
					
[0] 1:cat*                                                "saya" 18:41 22-Apr-20

The command prompt switches to a dark yellow/brown background.

pane 1                                  │pane 2
                                        │
					├───────────────────────────────────────
					pane 3
					
:command                                                                        

And other displays use other colors as indicators occasionally

(0)  - 0: 1 windows (attached)
(1)  └─> + 1: cat*Z (3 panes)                                                


┌ 1 (sort: index)──────────────────────────────────────────────────────────────┐
│ pane 1                  │pane 2                  │pane 3                     │
│                         │                        │                           │
│                         │                        │                           │
│                         │                        │                           │
│           ┌───┐         │          ┌───┐         │          ┌───┐            │
│           │ 0 │         │          │ 1 │         │          │ 2 │            │
│           └───┘         │          └───┘         │          └───┘            │
│                         │                        │                           │
│                         │                        │                           │
│                         │                        │                           │
└──────────────────────────────────────────────────────────────────────────────┘
[0] 1:[tmux]*Z                                            "saya" 18:47 22-Apr-20

VIM - Vi IMproved

VIM is a popular terminal code editor. While it has many built-in syntax highlighting themes (and lots more shared online), I'm just looking at the default theme here, which is what you might see if you run vim on an unconfigured or unfamiliar remote system.

VIM’s default color scheme is notable in that it has many different variants – it can run on 8-color, 16-color, or 256-color terminals, and the 256-color scheme is unusual in that it still uses the 16-color terminal palette for many colors. The color scheme also automatically adapts to the terminal having a dark or light background (here, it picks based on the the “Variant” you have selected in the top toolbar, although I let you override it).

I’m showing the output of VIM’s builtin “syntax/hitest.vim” script which dumps out information about the current highlight settings, except that I’ve moved the syntax highlighting groups to the top so you see them first. Note that a few of the lines printed are intentionally unreadable. On a local machine with up to date terminfo, you're most likely to see the 256 color version, but on ssh to an old box in a screen session you might have to deal with the 8 color version (and it might misdetect the background color too).

Syntax highlighting groups
--------------------------
MatchParen      MatchParen
Comment         Comment
Constant        Constant String Character Number Boolean Float
Special         Special Tag SpecialChar Delimiter SpecialComment Debug
Identifier      Identifier Function
Statement       Statement Conditional Repeat Label Operator Keyword Exception
PreProc         PreProc Include Define Macro PreCondit
Type            Type StorageClass Structure Typedef
Underlined      Underlined
Ignore          Ignore <-- This should be hidden/unreadable
Error           Error
Todo            Todo

Highlighting groups for various occasions
-----------------------------------------
SpecialKey      SpecialKey
NonText         NonText EndOfBuffer
Directory       Directory
ErrorMsg        ErrorMsg
IncSearch       IncSearch
Search          Search QuickFixLine
MoreMsg         MoreMsg
ModeMsg         ModeMsg
LineNr          LineNr
CursorLineNr    CursorLineNr
Question        Question
StatusLine      StatusLine
StatusLineNC    StatusLineNC
VertSplit       VertSplit
Title           Title
Visual          Visual
WarningMsg      WarningMsg
WildMenu        WildMenu
Folded          Folded
FoldColumn      FoldColumn
DiffAdd         DiffAdd
DiffChange      DiffChange
DiffDelete      DiffDelete
DiffText        DiffText
Conceal         Conceal
SpellBad        SpellBad
SpellCap        SpellCap
SpellRare       SpellRare
SpellLocal      SpellLocal
Pmenu           Pmenu
PmenuSel        PmenuSel
PmenuSbar       PmenuSbar
PmenuThumb      PmenuThumb
TabLine         TabLine
TabLineSel      TabLineSel
TabLineFill     TabLineFill
CursorColumn    CursorColumn
CursorLine      CursorLine
ColorColumn     ColorColumn
StatusLineTerm  StatusLineTerm
StatusLineTermNC                StatusLineTermNC
Normal          Normal
~                                                                               
:                                                             63,1          All

Legal Notices

Terminal Palette Test Page

MIT License

Copyright 2020 Calvin Walton

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Additional Bundled Software

Tom MacWright's wcag color contrast

BSD 2-Clause "Simplified" License

Copyright (c) 2017, Tom MacWright

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

WCAG: (unknown)