read_colortable

metpy.plots.ctables.read_colortable(fobj)[source]

Read colortable information from a file.

Reads a colortable, which consists of one color per line of the file, where a color can be one of: a tuple of 3 floats, a string with a HTML color name, or a string with a HTML hex color.

Parameters

fobj (a file-like object) – A file-like object to read the colors from

Returns

List of tuples – A list of the RGB color values, where each RGB color is a tuple of 3 floats in the range of [0, 1].