KPG1_NMCOL

Finds the RGB intensities of a named colour

Description:

Given the name of a colour this routine searches the standard colour set for it, and if it exists returns its R-G-B intensities. An error is returned if the named colour is not in the colour set. All comparisons are performed in uppercase with the blanks removed.

Invocation

CALL KPG1_NMCOL( NAME, R, G, B, STATUS )

Arguments

NAME = CHARACTER ( ) (Given)
The name of the nearest colour in the named colour set to the input RGB colour. Note at least eighteen characters are required to avoid truncation. This string may also be an HTML code of the form " #aabbcc" (or " @aabbcc" - for use in contexts where " #" is a comment character, e.g. KAPPA style files) where a, b and c are hexadecimal digits, and " aa" , " bb" and " cc" give red, blue and green intensities normalised to a maximum of " ff" (256).
R = REAL (Returned)
The red intensity of the named colour to be identified. It is in the range 0.0 to 1.0.
G = REAL (Returned)
The green intensity of the named colour to be identified. It is in the range 0.0 to 1.0.
B = REAL (Returned)
The blue intensity of the named colour to be identified. It is in the range 0.0 to 1.0.
STATUS = INTEGER (Given and Returned)
The global status.