bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[fileutils-4.0x] blue on dark is hard to read for the typical human bein


From: Charles Levert
Subject: [fileutils-4.0x] blue on dark is hard to read for the typical human being
Date: Thu, 4 Jan 2001 11:12:34 -0500

When ls/dir colorization is active, the following is used for
directories:

  DIR 01;34     # directory

This means that directories in /bin/ls output will appear in bold blue
over whatever background color is set in the terminal.  Quite often
that background color happens to be black (such as in VGA text
consoles) or another dark color.  The way the human eye works and the
way screens and monitors are made to match it, blue only accounts for
11% of brightness of white (while it's 59% for green and 30% for red).
See, e.g.,

  http://www3.ncsu.edu/ECE480/480_tvc.htm

for details.

This means that typical human beings (not just me) will have trouble
reading blue on black.  (All this to say that this is not a simple
matter of taste.)  The implication of this is that if blue is to be
chosen as a foreground color, then a complementary background color
has to be specified too.  White and yellow are good choices.
Therefore, I suggest the following line for DIR_COLORS:

  DIR 01;34;47  # directory

This would keep blue as a foreground color and cause the least surprise to
everybody that is used to it.  Those already using a white background will
not even see the change.  Those using a dark background will no longer
have to damage their eyes to read it.

Note that the same problem occurs for yellow on white and that yellow
on black is already forced for FIFO, BLK, and CHR files in
src/dircolors.hin and src/dircolors.h (but strangely not in src/ls.c).
Making the proposed change would bring more uniformity among default
color choices.

A patch for the relevant files follows.  Note that I didn't correct
the src/ls.c inconsistencies for pi:, bd:, cd:, and or: entries in
color_indicator[] (as compared to src/dircolors.*).


Charles



--- src/dircolors.h.orig-4.0x   Sat Apr  8 09:15:26 2000
+++ src/dircolors.h     Thu Jan  4 10:45:39 2001
@@ -49,7 +49,7 @@
   "# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white",
   "NORMAL 00   # global default, although everything should be something.",
   "FILE 00     # normal file",
-  "DIR 01;34   # directory",
+  "DIR 01;34;47        # directory",
   "LINK 01;36  # symbolic link.  (If you set this to 'target' instead of a",
   "            # numerical value, the color is as for the file pointed to.)",
   "FIFO 40;33  # pipe",
--- src/dircolors.hin.orig-4.0x Sat Apr  8 04:17:07 2000
+++ src/dircolors.hin   Thu Jan  4 10:45:26 2001
@@ -36,7 +36,7 @@
 # 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
 NORMAL 00      # global default, although everything should be something.
 FILE 00        # normal file
-DIR 01;34      # directory
+DIR 01;34;47   # directory
 LINK 01;36     # symbolic link.  (If you set this to 'target' instead of a
                # numerical value, the color is as for the file pointed to.)
 FIFO 40;33     # pipe
--- src/ls.c.orig-4.0x  Mon Jul 17 04:14:47 2000
+++ src/ls.c    Thu Jan  4 10:45:07 2001
@@ -481,7 +481,7 @@
     { 0, NULL },                       /* ec: End color (replaces lc+no+rc) */
     { LEN_STR_PAIR ("0") },            /* no: Normal */
     { LEN_STR_PAIR ("0") },            /* fi: File: default */
-    { LEN_STR_PAIR ("01;34") },                /* di: Directory: bright blue */
+    { LEN_STR_PAIR ("01;34;47") },     /* di: Directory: bright blue */
     { LEN_STR_PAIR ("01;36") },                /* ln: Symlink: bright cyan */
     { LEN_STR_PAIR ("33") },           /* pi: Pipe: yellow/brown */
     { LEN_STR_PAIR ("01;35") },                /* so: Socket: bright magenta */



reply via email to

[Prev in Thread] Current Thread [Next in Thread]