Modern terminals support 256 colors. It would be great if ls --color
could take advantage of the higher number of colors to improve the
way things are displayed.

The 256 available colors can be seen by running the 256color2.pl
script that comes with xterm, or by running 
env TERM=xterm-256color emacs -nw -f list-colors-display


The problem is deciding which colors to use. It would be great if
someone that has a good taste/knows something about colors or maybe is
a graphic artist could pick which colors to use. ls --color does not
need that many distinct colors. 

It would be good if the colors picked are easily readable when text
that uses them as foreground is displayed on a black background and a
white background terminal.

Below is the code from dircolors.hin that was changed so that it uses
the escape sequences used by a 256 color terminal, the colors were not
changed. It would be great if someone could figure out what colors to
use... 


# Configuration file for dircolors, a utility to help you set the
# LS_COLORS environment variable used by GNU ls with the --color option.

# Copyright (C) 1996, 1999-2007
# Free Software Foundation, Inc.
# Copying and distribution of this file, with or without modification,
# are permitted provided the copyright notice and this notice are preserved.

# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the
# slackware version of dircolors) are recognized but ignored.

# Below, there should be one TERM entry for each termtype that is colorizable
TERM xterm-256color

# Below are the color init strings for the basic file types. A color init
# string consists of one or more of the following numeric codes:
# Attribute codes:
# 00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:
# 30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes:
# 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
# Extended color codes for terminals that support more than 16 colors:
# (the above color codes still work for these terminals)
# Text color coding:
# 38;5;COLOR_NUMBER
# Background color coding:
# 48;5;COLOR_NUMBER
# COLOR_NUMBER is from 0 to 255.
NORMAL 00       # global default, although everything should be something.
FILE 00         # normal file
DIR 00;38;5;4   # directory
LINK 00;38;5;6  # symbolic link.  (If you set this to 'target' instead of a
                # numerical value, the color is as for the file pointed to.)
FIFO 48;5;0;38;5;3 # pipe
SOCK 00;38;5;5  # socket
DOOR 01;38;5;5  # door
BLK 48;5;0;38;5;3;01 # block device driver
CHR 48;5;0;38;5;3;01 # character device driver
ORPHAN 01;05;38;5;7;48;5;1 # symlink to nonexistent file, or non-stat'able file
SETUID 38;5;7;41        # file that is setuid (u+s)
SETGID 38;5;0;43        # file that is setgid (g+s)
STICKY_OTHER_WRITABLE 38;5;0;48;5;2 # dir that is sticky and other-writable 
(+t,o+w)
OTHER_WRITABLE 38;5;4;48;5;2 # dir that is other-writable (o+w) and not sticky
STICKY 38;5;7;48;5;4    # dir with the sticky bit set (+t) and not 
other-writable

# This is for files with execute permission:
EXEC 00;38;5;2

# List any file extensions like '.gz' or '.tar' that you would like ls
# to colorize below. Put the extension, a space, and the color init string.
# (and any comments you want to add after a '#')

# If you use DOS-style suffixes, you may want to uncomment the following:
#.cmd 00;38;5;2 # executables (bright green)
#.exe 00;38;5;2
#.com 00;38;5;2
#.btm 00;38;5;2
#.bat 00;38;5;2
# Or if you want to colorize scripts even if they do not have the
# executable bit actually set.
#.sh  00;38;5;2
#.csh 00;38;5;2

 # archives or compressed (bright red)
.tar 00;38;5;1
.tgz 00;38;5;1
.svgz 00;38;5;1
.arj 00;38;5;1
.taz 00;38;5;1
.lzh 00;38;5;1
.zip 00;38;5;1
.z   00;38;5;1
.Z   00;38;5;1
.dz  00;38;5;1
.gz  00;38;5;1
.bz2 00;38;5;1
.bz  00;38;5;1
.tbz2 00;38;5;1
.tz  00;38;5;1
.deb 00;38;5;1
.rpm 00;38;5;1
.jar 00;38;5;1
.rar 00;38;5;1
.ace 00;38;5;1
.zoo 00;38;5;1
.cpio 00;38;5;1
.7z  00;38;5;1
.rz  00;38;5;1

# image formats
.jpg 00;38;5;5
.jpeg 00;38;5;5
.gif 00;38;5;5
.bmp 00;38;5;5
.pbm 00;38;5;5
.pgm 00;38;5;5
.ppm 00;38;5;5
.tga 00;38;5;5
.xbm 00;38;5;5
.xpm 00;38;5;5
.tif 00;38;5;5
.tiff 00;38;5;5
.png 00;38;5;5
.mng 00;38;5;5
.pcx 00;38;5;5
.mov 00;38;5;5
.mpg 00;38;5;5
.mpeg 00;38;5;5
.m2v 00;38;5;5
.mkv 00;38;5;5
.ogm 00;38;5;5
.mp4 00;38;5;5
.m4v 00;38;5;5
.mp4v 00;38;5;5
.vob 00;38;5;5
.qt  00;38;5;5
.nuv 00;38;5;5
.wmv 00;38;5;5
.asf 00;38;5;5
.rm  00;38;5;5
.rmvb 00;38;5;5
.flc 00;38;5;5
.avi 00;38;5;5
.fli 00;38;5;5
.gl 00;38;5;5
.dl 00;38;5;5
.xcf 00;38;5;5
.xwd 00;38;5;5
.yuv 00;38;5;5

# audio formats
.aac 00;38;5;6
.au 00;38;5;6
.flac 00;38;5;6
.mid 00;38;5;6
.midi 00;38;5;6
.mka 00;38;5;6
.mp3 00;38;5;6
.mpc 00;38;5;6
.ogg 00;38;5;6
.ra 00;38;5;6
.wav 00;38;5;6


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to