Table of Contents

Name

MAGpalette - maps color index in MAG file to actual color

Synopsis


#include <maglo.h>
int MAGpalette(MagImage *mag, int index);

Description

The MAGpalette() function maps color palette index index in MAG file to which mag is associated to actual 24-bit color and returns it as a 32-bit integer.

In MAG format, a color is represented as palette index, and palette maps palette index to actual color.

The range of index is 0 to (the value returned by MAGscrModeNumColors() - 1).

Return Values

The return value represents actual 24-bit color in the 0x00RRGGBB format.

See Also

MAGscrModeNumColors(3) , libmaglo(7)


Table of Contents