Thread View: news.software.readers
3 messages
3 total messages
Started by Joe Koenig
Sun, 01 Jul 2007 08:10
[slrn] color names
Author: Joe Koenig
Date: Sun, 01 Jul 2007 08:10
Date: Sun, 01 Jul 2007 08:10
63 lines
2334 bytes
2334 bytes
Hi,
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
This seems to cause some problems. Let me explain:
color cursor "red" "blue"
color cursor "blue" "red"
Both of the above settings do what you'd expect them to do.
Now, when setting
color cursor "white" "red"
SLRN interprets it as
color cursor "LightSlateGray" "red"
OK, I can somehow follow this logic (don't ask me why).
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".)
What's the magic behind this?
Joe
-
$ slrn --version
Slrn 0.9.8.1pl1 [2005-02-17]
* Note: This version is a developer preview.
S-Lang Library Version: 2.0.6
Compiled at: Jun 21 2006 08:22:07
Operating System: Debian
COMPILE TIME OPTIONS:
Backends: +nntp +slrnpull +spool
External programs / libs: +canlock +inews +ssl +uudeview
Features: +charset_mapping +decoding +emphasized_text +end_of_thread
+fake_refs +gen_msgid -grouplens +mime -msgid_cache +piping +rnlock
+slang +spoilers -strict_from
DEFAULTS:
Default server object: nntp
Default posting mechanism: nntp
Default character set: isolatin
SUPPORTED CHARACTER SETS:
isolatin ibm850 ibm852 ibm857 ibm737 NeXT koi8
Re: [slrn] color names
Author: 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
Re: [slrn] color names
Author: Joe Koenig
Date: Mon, 02 Jul 2007 12:24
Date: Mon, 02 Jul 2007 12:24
13 lines
1120 bytes
1120 bytes
* John E. Davis" <davis@space.mit.edu> wrote: [why color names are not being interpreted literally] > 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: [...] Thank you. Joe
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads