PALETTEINDEX macro (wingdi.h)

The PALETTEINDEX macro accepts an index to a logical-color palette entry and returns a palette-entry specifier consisting of a COLORREF value that specifies the color associated with the given index. An application using a logical palette can pass this specifier, instead of an explicit red, green, blue (RGB) value, to GDI functions that expect a color. This allows the function to use the color in the specified palette entry.

Syntax

void PALETTEINDEX(
   i
);

Parameters

i

An index to the palette entry containing the color to be used for a graphics operation.

Return value

None

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header wingdi.h (include Windows.h)

See also

COLORREF

Color Macros

Colors Overview

PALETTERGB

RGB