Platform Package reference: Function EwColorToIndex()

Description of the function EwColorToIndex() available in Platform Packages for ANSI C compatible target systems running in the color format Index8 (CLUT based). This function is intended to be used when integrating the Embedded Wizard created GUI application with the underlying graphics subsystem, graphics hardware or other external GUI applications coexisting on the same system.

Declaration

XUInt8 EwColorToIndex( XColor aColor )

Parameters

aColor

Color to be found in the global CLUT (color look-up table).

Discussion

The function EwColorToIndex() determines an entry within the global CLUT (color look-up table), which corresponds to the given color value. The operation is based on the nearest color matching algorithm. To find an exactly matching color use the function EwFindUserColor().