Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Are there 8 or 16 colors ???



On Jan 8,  6:20pm, Joel CARNAT wrote:
} 
} 	Is the color feature of ZSH enables 8 or 16 colors ?

There is no color feature of zsh.  There's a color feature of certain
terminals and terminal emulators.  It's up to the terminal what colors
you actually see when you echo one of those sequences.  Zsh has some
features to allow it to use the colors provided by the terminal, but
that's all.

} 	Looks like I only can get 8 normal and 8 bold colors...

See the "User Contributions" section of the documentation, under "Other
Functions", the description of the "colors" function.  ("man zshcontrib"
if you don't use the texinfo docs.)  I quote:

     The eight base colors are: black, red, green, yellow, blue,
     magenta, cyan, and white.  Each of these has codes for foreground
     and background.  In addition there are eight intensity attributes:
     bold, faint, standout, underline, blink, reverse, and conceal.
     Finally, there are six codes used to negate attributes: none
     (reset all attributes to the defaults), normal (neither bold nor
     faint), no-standout, no-underline, no-blink, and no-reverse.

     Some terminals do not support all combinations of colors and
     intensities.

Some terminals implement "black" as a dark grey and "white" as a very pale
grey so that the "bold" versions of those colors can be true black and true
white (and thereby stand out against their dimmer "normal" colors when the
normal colors are used as the background).  It sounds like your terminal is
doing something similar with green.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author