palette_color - Man Page

Maps palette indexes into the current pixel format colors. Allegro game programming library.

Synopsis

#include <allegro.h>

extern int palette_color[256];

Description

Table mapping palette index colors (0-255) into whatever pixel format is  being used by the current display mode. In a 256-color mode this just  maps onto the array index. In truecolor modes it looks up the specified  entry in the current palette, and converts that RGB value into the  appropriate packed pixel format. Example:

   set_color_depth(32);
   ...
   set_palette(desktop_palette);
   /* Put a pixel with the color 2 (green) of the palette */
   putpixel(screen, 100, 100, palette_color[2]);

See Also

set_palette(3), makecol(3), set_color_depth(3)

Referenced By

ex3d(3), exjoy(3), exmem(3), exmouse(3), expat(3), exquat(3), exscn3d(3), exshade(3), exspline(3), exsprite(3), exstars(3), exswitch(3), exzbuf(3), set_palette(3).

version 4.4.3 Allegro manual