Package: colorobject
Highlightscolorobjectsarer, g, b, atuples that support easy conversion to other
color types (e.g. HSV, HLS, hexadecimal, or Matplotlib color names) and convenient
transformation (e.g. adjust color lightness, hue, saturation, or alpha).
Conversions are as convenient asc = somecolor.hsv, and transformations as easy assomecolor.lightness = c. And because acolorobjectis just an extension of
the list class, they can be passed directly to any Matplotlib plotting command.colorlistsare lists ofcolorobjectsthat allow you to easily modify or
construct colormaps (see modulecolormaps) or cycle through lists of maximally
distinct colors (see modulediscretecolors). Changing the brightness of a
Matplotlib colormap can be as simple ascmap_adjust(mycolormap, ‘lighten’, 0.5)and you can even construct a colormap directly from any valid Matplotlib color
name with:colorlist(color('Aqua', 'name'), color('Gold', 'name')).LinearSegmentedColormap()Some examples:off-the-shelf Matplotlib colormap (‘BuPu’)cmap_lighten()cmap_darken()cmap_adjust()used to rotate the huecmap_adjust()used to change the saturationconstructing an entirely new colormap using the Matplotlib color names ‘Aqua’
and ‘Gold’ as endpointsLooking for a set of easily distinguishable colors? You could rely on one of the
lists contained incustom_colorsets. Access to the color sets is through a
statement such as:colorobject.custom_colorsets.cartercarter_6The included color sets are:cartercarter_6: 6 high contrast colors from Carter and Carter (1982)greenarmytage_26: 26 colors intended for use against a white background from
Green-Armytage (2010)tatarize_269: 269 colors from the author of thegodsnotwheregodsnotblogInstallationcolorobjecthas only been tested in Python 2.7Install through pip:$ pip install colorobjectRequires the following non-standard libraries:matplotlibBecause the preferred installation of matplotlib can vary depending on the operating system,
matplotlib will not automatically be installed as a dependency. Instead, installation will
raise an exception if matplotlib cannot be found in the pythonpath. In this case, please
install matplotlib via your preferred method, most of which are explainedby matplotlibBonus!Also included are a set of custom Matplotlib colormaps. These colormaps were designed to
have every color in the colormap be clearly distinguishable against a white background. Also,
the ordering of the colors from low to high is intended to be as intuitive as possible and
there are no sudden peaks in the lightness or hue. Access to the colormaps is through a
statement such as:colorobject.custom_colormaps.sparse2denseThe intended use for these colormaps is:cool2hot: temperature or heatdeep2shallow: bathymetry mapsdirty2clean: environmental condition or degredationsparse2dense: density mapslow2high: genericChangelog0.8.1 (DECEMBER/02/2014)Moved custom color sets from modulediscretecolorsto named tuplecustom_colorsetsin
moduledata. Access is through a statement such ascolorobject.custom_colorsets.cartercarter_6Added custom color maps with named tuplecustom_colormapsto moduledata. Access is
through a statement such ascolorobject.custom_colormaps.sparse2dense0.8.0 (DECEMBER/01/2014)First release