; $Header: /usr/build/vile/vile/macros/RCS/palettes.rc,v 1.7 2001/04/07 15:02:22 tom Exp $ ; Sample color schemes. ~if ¬ &error $ncolors ; Note that while the palette strings reference up to 16 colors, you will have ; only 8 available if vile is linked with termcap. To get 16 colors, you need ; terminfo (e.g., ncurses), and a terminal emulator that supports 16 colors. ~local %palette ~local %dark-palette ~local %light-palette set color-scheme=default setv %dark-palette " " setv %light-palette "" setv %palette 0 ~while &less %palette $ncolors ~if &or &equal %palette 3 &equal %palette 11 setv %light-palette &cat %light-palette &cat " " &word &add 1 %palette $palette setv %dark-palette &cat %dark-palette &cat " " &word %palette $palette ~elseif &or &equal %palette 4 &equal %palette 12 setv %light-palette &cat %light-palette &cat " " &word %palette $palette setv %dark-palette &cat %dark-palette &cat " " &word &sub %palette 1 $palette ~else setv %light-palette &cat %light-palette &cat " " &word %palette $palette setv %dark-palette &cat %dark-palette &cat " " &word %palette $palette ~endif setv %palette &add %palette 1 ~endwhile ; Note: if we are using the default, or system colors, it is generally not possible ; to determine what their values are. The "light" and "dark" schemes use default ; colors. ; on a light background, we don't like to use yellow - map it to blue define-color-scheme light use=default palette=%light-palette ; on a dark background, we don't like to use blue - map it to yellow define-color-scheme dark use=default palette=%dark-palette ; FIXME - implement "&isa" ;~if &isa color default ; define-color-scheme light fcolor=default bcolor=default ; define-color-scheme dark fcolor=default bcolor=default ;~endif define-color-scheme reverse video-attr=rev define-color-scheme white use=dark fcolor=white bcolor=black define-color-scheme black use=light bcolor=white fcolor=black ~endif