

a string representation of a float, like ‘0.4’,.Returns an RGB tuple of three floats from 0-1.Īrg can be an RGB or RGBA sequence or a string in any of Ordinarily only the single instance instantiated in this module,ĬolorConverter, is needed. Provides methods for converting color specifications to RGB or RGBAĬaching is used for more efficient conversion upon repeated calls If high these are converted to valid indices byĬolormap._call_().

Out-of-range values are mapped to -1 if low and ncolors For the basic built-in colors, you can use a single letter Specifications or sequences of them to RGB or RGBA.Ĭommands which take color arguments can use several formats to specify The module also provides a single instance, colorConverter, of theĬolorConverter class providing methods for converting single color ListedColormap, which is used for generating a custom colormap from a

LinearSegmentedColormap, which is used to generate all the built-inĬolormap instances, but is also useful for making custom colormaps, and Subclass then this number in the 0-1 range is mapped to a color using an Mapped onto the range 0-1 using an instance of Normalize or of a Colormapping typically involves two steps: a data array is first This module includes functions and classes for color specificationĬonversions, and for mapping numbers to colors in a 1-D array of colors calledĪ colormap. RGB and RGBA are sequences of, respectively, 3 or 4 floats in the A module for converting numbers or color arguments to RGB or RGBA
