Reads the given color map and returns an array of RGBA tuples.
Available in version 1.5.0 or later.
rgba = Ngl.read_colormap_file(colormap_name)
The name of the predefined PyNGL color map, i.e. "rainbow".
This is a convenience function for loading any one of PyNGL's system color maps. Its primary use-case is loading and possibly subsetting color maps that are then assigned to resources such as cnFillPalette, cnFillColors, vcLevelPalette, vcLevelColors, stLevelColors, or stLevelPalette.
Note that the function always returns 4-component colors, consisting of red/green/blue/opacity values. If the source color tables do not contain opacity values, a default of 1.0 (opaque) is returned.
See any one of the following examples: