Sign in Join
FPDoc Onlineexperiment

ColorIndex function

In unit Graphics

Finds the position in the color identifier map for the specified value.

Declaration

pascal
function ColorIndex(Color: LongInt; out Index: Integer): Boolean

Arguments

Color

Color value to locate in Colors.

Index

Position in Colors where the color value was found.

Function result

True when the color value exists in Colors.

Description

ColorIndex is a Boolean function used to determine if the color value specified in Color exists in the color value to name identifier map.

ColorIndex iterates over the values in the Colors constant to find an element in the array with the value specified in Color. The position for the value is assigned to the Index output parameter. The return value is True when a value is located in Colors. Otherwise, the return value is False. The value in Index is not significant when the return value is False.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.