NCL Home > Documentation > Functions > Graphics routines

GetFillColor

Chooses a color from a group of RGB triplets based upon a secondary scalar field.

Prototype

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"

	function GetFillColor (
		cnlevels [*] : numeric,  
		cmap  [*][3] : numeric,  
		value    [1] : numeric   
	)

	return_val  :  integer

Arguments

cnlevels

A one-dimensional array of any numeric type equal to the contour levels of the scalar field.

cmap

A one-dimensional array x 3 array of RGB triplets. The leftmost dimension must be one larger than cnlevels.

value

A scalar value equal to the single contour level for which a color is desired. Must be the same numeric type as cnlevels.

Return value

A scalar value equal to an index in cmap.

Description

Will choose a color from a group of RGB triplets based upon a secondary scalar field.

See Also

GetFillColorIndex