Article View: news.software.readers
Article #201265Re: [slrn] color names
From: John E. Davis
Date: Mon, 02 Jul 2007 06:03
Date: Mon, 02 Jul 2007 06:03
82 lines
3148 bytes
3148 bytes
On 1 Jul 2007 08:10:32 GMT, Joe Koenig <jko@gmx.de> wrote: >please enlighten me on the intrinsic logic of the SLRN color >handling. > >I've got a setting in my ~/.Xdefaults that says: > > XTerm*color15: LightSlateGray [...] >Now, when setting > > color cursor "white" "red" > >SLRN interprets it as > > color cursor "LightSlateGray" "red" > >But then, when setting > > color cursor "red" "white" > >it doesn't inverse the above colors. I doesn't interpret them as > > color cursor "red" "LightSlateGray" > >Instead, it interprets it as > > color cursor "red" "white" > >(i.e.: it interprets it just like I wrote it, instead of translating >"white" to "LightSlateGray".) The colors get mapped to integers that are sent to the terminal as escape sequences. SLang has no way of knowing how those integers will get mapped to the colors that you see. Rather a standard mapping is used: #v+ "black" 0 "red" 1 "green" 2 "brown" 3 "blue" 4 "magenta" 5 "cyan" 6 "lightgray" 7 #v- The "bright" versions of those may be used as _foreground_ colors: #v+ "gray" "brightred" "brightgreen" "yellow" "brightblue" "brightmagenta" "brightcyan" "white" #v- These are created by using a "bold" escape sequence. If your terminal's terminfo file indicates that the terminal supports more than 8 colors, then SLang allows those colors to be specified using color0, color1, ..., color15. So instead of using #v+ color cursor "red" "white" #v- you might try: #v+ color cursor "color1" "color15" #v- Finally, if the terminal supports the "default" color, you can use "default" to refer to the terminals foreground/background color, e.g., #v+ color normal "default" "default" #v- To summarize, slrn/slang has no way of really knowing how to generate a "red" color. Rather, it sends an escape sequence to the terminal telling it to display color-1 (ansi red), but if your terminal is setup to display color-1 as blue, then you will see blue. --John
Technical Details
Message-ID:
<slrnf8h588.pnj.davis@aluche.mit.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!198.186.194.251.MISMATCH!news-out.readnews.com!transit4.readnews.com!panix!bloom-beacon.mit.edu!senator-bedfellow.mit.edu!dreaderd!not-for-mailReferences:
<5ep5roF39nk29U1@mid.uni-berlin.de>Show Full Headers
Complete Article Headers
Message-ID: <slrnf8h588.pnj.davis@aluche.mit.edu> Subject: Re: [slrn] color names Date: Mon, 02 Jul 2007 06:03:26 +0000 From: davis@space.mit.edu (John E. Davis) References: <5ep5roF39nk29U1@mid.uni-berlin.de> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!198.186.194.251.MISMATCH!news-out.readnews.com!transit4.readnews.com!panix!bloom-beacon.mit.edu!senator-bedfellow.mit.edu!dreaderd!not-for-mail Newsgroups: news.software.readers Organization: Center for Space Research Reply-To: davis@space.mit.edu User-Agent: slrn/0.9.6.4 (Linux) Lines: 82 NNTP-Posting-Host: ALUCHE.MIT.EDU X-Trace: 1183356206 senator-bedfellow.mit.edu 483 18.75.2.45