1restorepalette(1) Svgalib User Manual restorepalette(1)
2
3
4
6 restorepalette - set the color palette for textmode.
7
9 restorepalette [filename]
10
11
13 restorepalette without arguments sets the standard VGA palette. This
14 can be useful if it is somehow messed up.
15
16 With a filename argument a custom palette can be loaded (feature added
17 by Charles Blake <chuckb@alice.wonderland.caltech.edu>).
18
19 This allow a user to set up a file that looks like this one (These
20 color map definitions are the same as the default VGA ones. Alter to
21 suite personal tastes). The first column contains the number of the
22 color to set, then follow three integers in range 0 - 63 (lowest to
23 highest intensity) for red, green, blue.
24
25 0 0 0 0 # black
26 1 0 0 42 # blue
27 2 0 42 0 # green
28 3 0 42 42 # cyan
29 4 42 0 0 # red
30 5 42 0 42 # magenta
31 6 42 21 0 # brown
32 7 42 42 42 # white
33 8 21 21 21 # bright black
34 9 21 21 63 # bright blue
35 10 21 63 21 # bright green
36 11 21 63 63 # bright cyan
37 12 63 21 21 # bright red
38 13 63 21 63 # bright magenta
39 14 63 63 21 # bright brown
40 15 63 63 63 # bright white
41
42 The inline comments are the only kind of allowed, as I use a little
43 fscanf(3) trick to get them. Blank lines are ok, but not pure comment
44 lines. See the comments in my code, also.
45
46 This allows people to set up custom palettes for use in virtual console
47 text modes. I use it all the time. When combined with a color-syntax
48 editor like jed-0.97+ or color-ls, etc., being able to choose your own
49 text-mode palette is quite a bonus. I set mine up via restorepalette
50 /etc/palette in my /etc/rc. If the program is given the correct per‐
51 missions, then individual users can have restorepalette ~/.palette or
52 some such thing in their shell startup files. Of course, it shouldn't
53 be done when starting remote shells or when under X, so some kind of
54 test that TERM is a virtual console is needed for that case.
55
56
58 svgalib(7), vgagl(7), libvga.config(5), vga_setpalvec(3), dumpreg(1),
59 convfont(1), fix132x43(1), restorefont(1), restoretextmode(1), runx(1),
60 savetextmode(1), setmclk(1), textmode(1).
61
63 This manual page was edited by Michael Weller <eowmob@exp-math.uni-
64 essen.de>. The exact source of the referenced utility as well as of the
65 original documentation is unknown.
66
67 It is very likely that both are at least to some extent are due to Harm
68 Hanemaayer <H.Hanemaayer@inter.nl.net>.
69
70 Occasionally this might be wrong. I hereby asked to be excused by the
71 original author and will happily accept any additions or corrections to
72 this first version of the svgalib manual.
73
74
75
76Svgalib (>= 1.2.11) 2 Aug 1997 restorepalette(1)