1palette_color(3)                Allegro manual                palette_color(3)
2
3
4

NAME

6       palette_color - Maps palette indexes into the current pixel format col‐
7       ors. Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       extern int palette_color[256];
14

DESCRIPTION

16       Table mapping palette index colors (0-255) into whatever  pixel  format
17       is  being  used  by  the current display mode. In a 256-color mode this
18       just maps onto the array index. In truecolor  modes  it  looks  up  the
19       specified  entry  in  the  current palette, and converts that RGB value
20       into the appropriate packed pixel format. Example:
21
22          set_color_depth(32);
23          ...
24          set_palette(desktop_palette);
25          /* Put a pixel with the color 2 (green) of the palette */
26          putpixel(screen, 100, 100, palette_color[2]);
27
28

SEE ALSO

30       set_palette(3), makecol(3), set_color_depth(3)
31
32
33
34Allegro                          version 4.4.3                palette_color(3)
Impressum