KPG1_PLCIP

Finds the nearest colour in the palette to a named colour (PGPLOT version of KPG1_PALCI)

Description:

This routine finds the PGPLOT colour index within the palette of a named colour. The required colour must be in the standard colour set, and SAI__ERROR status is returned if it is not. If the named colour is not present the index of the colour nearest to the requested colour is returned. A city-block metric is used.

A close colour is only accepted if the close colour is not equal to the background colour. This avoids pens becoming invisible.

Invocation

CALL KPG1_PLCIP( COLOUR, COLIND, STATUS )

Arguments

COLOUR = CHARACTER ( ) (Given)
The name of the colour whose colour index is required. Note at least eighteen characters are required to avoid truncation. The name may be abbreviated. If there is any ambiguity, the first match (in alphabetical order) is selected.
COLIND = INTEGER (Returned)
The colour index within the palette of the colour or its nearest equivalent.
STATUS = INTEGER (Given and Returned)
The global status.

Prior Requirements