![]() |
||
| Home | SwiftForth Archive | SwiftX Archive | |

On Apr 22, 2008, at 10:10 AM, Rick VanNorman wrote:
> With regards to the colors question: I specifically meant:
>
> Do you use more than the four named colors? Specifically,
> there are 16 supported color attributes, but only the first four
> are explicitly named (normal, bright, bold, inverse).
>
> Does anyone use more than the first four?
Yes. To represent colorforth blocks the extra colors are needed.
I added these colors to Linux Swiftforth. The names are not optimal,
but describe foreground, background and intensity.
: csi ( a u -- ) [ctrl] [ emit type ; \ Control Sequence Introducer
\ ansi terminal colors
\ FG BG Attribute esc[{attr1};...;{attrn}m
\ black 30 40 0 reset all attributes
\ red 31 41 1 bright bold
\ green 32 42 2 dim
\ yellow 33 43 5 blink less than 150 per minute
\ blue 34 44 7 reverse swap foreground and background
\ magenta 35 45 8 hidden
\ cyan 36 46
\ white 37 47
\ fbi f=Foreground=text b=Background i=Intensity
: wk- ( -- ) s" [0;37;40m" csi ; \ white dim
: rk+ ( -- ) s" [0;31;40;1m" csi ; \ red
: gk+ ( -- ) s" [0;32;40;1m" csi ; \ green
: bk+ ( -- ) s" [0;34;40;1m" csi ; \ blue
: ck+ ( -- ) s" [0;36;40;1m" csi ; \ cyan
: mk+ ( -- ) s" [0;35;40;1m" csi ; \ magenta
: yk+ ( -- ) s" [0;33;40;1m" csi ; \ yellow
: kw- ( -- ) s" [0;30;47m" csi ; \ black dim
: yk- ( -- ) s" [0;33;40m" csi ; \ yellow dim
: gk- ( -- ) s" [0;32;40m" csi ; \ green dim
: ek+ ( -- ) s" [0;37;40;1m" csi ; \ gray
: k-- ( -- ) s" [0m" csi ; \ normal
-- Bill Muench Santa Cruz, California ---------------------------------------------------------------------- sftalk_at_forth.com The SwiftForth programming discussion email list To unsubscribe, send subject "unsubscribe" to sftalk-request_at_forth.com For list command help, send subject "help" to sftalk-request_at_forth.com Message archives are located at http://www.forth.com/archive/sftalk ---------------------------------------------------------------------- This list is a forum for SwiftForth users. For product support and bug reports, please send email to support_at_forth.com ----------------------------------------------------------------------Received on Tue Apr 22 2008 - 11:21:52 PDT
This archive was generated by hypermail 2.2.0 : Tue Dec 02 2008 - 03:04:44 PST