Opened 12 years ago

Closed 11 years ago

#1469 closed bug (fixed)

ls od dir commands produce illegible colors.

Reported by: bbjimmy Owned by: stippi
Priority: normal Milestone: R1
Component: Applications/Terminal Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

performing ls or dior from a terminal produces colored text depending on file type. This MUST be an option, not the default. Older eyes - myne - cannot read the terminal listing. BeOS R5 did not have this trouble. please fix it so that everyone can read the terminal by default.

Attachments (3)

ls.jpg (90.2 KB) - added by bbjimmy 12 years ago.
ls command output in BeOS hrev5.03
Terminal_amber-on-black.png (42.3 KB) - added by humdinger 12 years ago.
Amber on black Terminal
color_codes (1.1 KB) - added by bonefish 12 years ago.
mmu_man's script to print a table showing the effect of the color codes

Download all attachments as: .zip

Change History (13)

Changed 12 years ago by bbjimmy

Attachment: ls.jpg added

ls command output in BeOS hrev5.03

comment:1 Changed 12 years ago by leavengood

This is just an alias in bash (ls="ls --color"). All you have to do is add:

unalias ls

to your .profile in your home directory to turn it off. I think most people would prefer it on, which is why it is the default.

comment:2 Changed 12 years ago by bbjimmy

This MUST NOT be default. If it is, then the OS cannot be deployed as a production os in any business in the US. It would not meet the Americans with disabilities act. Simple black on white, or white on black is fine, or, make the ls -color an option from the Terminal application menu.

comment:3 in reply to:  2 Changed 12 years ago by jackburton

Replying to bbjimmy:

This MUST NOT be default. If it is, then the OS cannot be deployed as a production os in any business in the US. It would not meet the Americans with disabilities act. Simple black on white, or white on black is fine, or, make the ls -color an option from the Terminal application menu.

Every OS which uses bash has colored output by default (IIRC BeOS had colored output by default too) I just checked on Ubuntu and the colors are more readable, though (the text looks less contrasted). Maybe we're doing something wrong ? Note that I compared ubuntu vs haiku on vmware, so vmware could be responsible of the more contrasted text.

comment:4 Changed 12 years ago by stippi

The colors should certainly be changed. My eyes are quite good, but yellow on white is simply not readable. Some of the output uses some weird form of "false bold" too. I just don't think the color output is either well readable nor very tasteful right now. If somebody could point me to the location in our source tree where the output is defined, I will be happy to figure out a more pleasant scheme. :-)

comment:5 Changed 12 years ago by humdinger

BTW, I always configure Terminal to be amber on black. I don't know how well that works when you're reading much text for a long time, but for an occasional CLI session it's very nice. (see screenshot)

Changed 12 years ago by humdinger

Attachment: Terminal_amber-on-black.png added

Amber on black Terminal

comment:6 in reply to:  4 Changed 12 years ago by bonefish

Replying to stippi:

The colors should certainly be changed. My eyes are quite good, but yellow on white is simply not readable. Some of the output uses some weird form of "false bold" too. I just don't think the color output is either well readable nor very tasteful right now. If somebody could point me to the location in our source tree where the output is defined, I will be happy to figure out a more pleasant scheme. :-)

The default color codes used by ls are built-in (cf. src/bin/coreutils/src/ls.c: color_indicator[]) and can be customized using the LS_COLORS environment variable. Given a configuration file, the dircolors tool prints the LS_COLORS string that this configuration translates to. It can also print the default configuration, so you have a start config file to play with. The ANSI VT/100 color codes can e.g. be found here:

http://www.termsys.demon.co.uk/vtansi.htm#colors

I'll also attach mmu_man's little script that prints out a nice table (I've allowed myself to rename it from ANSIHLP to color_codes, though).

I have only seen the color codes being mapped to color names so far, not to exact RGB color values. So maybe there's room to optimize them. That would have to be done in src/apps/terminal/TermView.cpp: kTermColorTable[]. How the color codes are translated to indices into this table can be seen in TermParse.cpp -- best search for FORECOLOR.

Changed 12 years ago by bonefish

Attachment: color_codes added

mmu_man's script to print a table showing the effect of the color codes

comment:7 Changed 12 years ago by bbjimmy

If we must have color, the Amber on black looks quite readable.

comment:8 in reply to:  7 Changed 12 years ago by bonefish

Replying to bbjimmy:

If we must have color, the Amber on black looks quite readable.

The amber itself is not nearly as well as readable as black on white. Besides, it's not for no reason, that virtually all of today's editors and terminals have black on white (or at least a bright color) as default.

comment:9 Changed 12 years ago by jackburton

Owner: changed from jackburton to stippi

comment:10 Changed 11 years ago by jackburton

Resolution: fixed
Status: newclosed

Was fixed by Axel in hrev23437

Note: See TracTickets for help on using tickets.