1vga_setpalette(3) Svgalib User Manual vga_setpalette(3)
2
3
4
6 vga_setpalette - set a color in the color lookup table
7
9 #include <vga.h>
10
11 void vga_setpalette(int index, int r, int g, int b);
12
13
15 Set the current color with index index to RGB values r, g, and b, each
16 in the range 0 - 63. This function is only sensible in 16 or 256 color
17 modes. It selects which color all vga_setcolor(index) drawn pixels will
18 actually refer to.
19
20 Note that setting color 0 will modify the background color and that
21 setting any color in range 0 .. 15 will affect the operation of
22 vga_setegacolor(3).
23
24 If the VGA_CLUT8 feature is set for the current mode with
25 vga_ext_set(3) the r, g, and b values are in the range 0 - 255.
26
27 The vgatest(6) demo shows the basic use of this function.
28
29
31 svgalib(7), vgagl(7), libvga.config(5), vgatest(6), vga_ext_set(3),
32 vga_setpalvec(3), vga_getpalette(3), vga_getpalvec(3), vga_setrgb‐
33 color(3), vga_setcolor(3), vga_setegacolor(3)
34
36 This manual page was edited by Michael Weller <eowmob@exp-math.uni-
37 essen.de>. The exact source of the referenced function as well as of
38 the original documentation is unknown.
39
40 It is very likely that both are at least to some extent are due to Harm
41 Hanemaayer <H.Hanemaayer@inter.nl.net>.
42
43 Occasionally this might be wrong. I hereby asked to be excused by the
44 original author and will happily accept any additions or corrections to
45 this first version of the svgalib manual.
46
47
48
49Svgalib (>= 1.2.11) 27 July 1997 vga_setpalette(3)