Welcome to python-colorspace’s documentation!¶
python-colorspace is a python package to create and handle colors and color
palettes in python. Based on the Hue-Chroma-Luminance (HCL) color space
effective color palettes can be designed and implemented in your own daily
This package is based on the code and ideas of the R colorspace package as it has often been requested by python enthusiasts. More information and an interactive interface can also be found on HCLwizard.org.
- Getting started
Other Packages and Further Reading¶
More information and further reading:
- hclwizard.org: more information about the HCL color space, introduction to the colorspace packages (in R and python), and some interactive tools to define effective HCL-based color palettes, pick colors, and check existing plots and figures for possible problems in terms of color vision deficiencies.
- A list of scientific articles which provide more detailed insights, e.g.
- The end of the rainbow: an open letter to the climate science community by Ed Hawkins, Doug McNeall, David Stephenson, Jonny Williams & Dave Carlson.
- Better Figures: Constructive criticism of the graphics of climate science by Doug McNeall.
Scientific articles with more detailed insights:
- Stauffer, R., Mayr, G. J., Dabernig, M., & Zeileis, A. (2015). Somewhere Over the Rainbow: How to Make Effective Use o f Colors in Meteorological Visualizations. Bulletin of the American Meteorological Society, 96(2), 203–216, doi: 10.1175/BAMS-D-13-00155.1.
- Zeileis, A., Hornik, K., & Murrell, P. (2009). Escaping RGBland: Selecting colors for statistical graphics. Computational Statistics &Amp; Data Analysis , 53(9), 3259–3270, doi:10.1016/j.csda.2008.11.033.
- Ihaka, R., 2003. Colour for presentation graphics. In: Hornik, K., Leisch, F., Zeileis, A. (Eds.), Proceedings of the 3rd International Workshop on Distributed Statistical Computing, Vienna, Austria, ISSN 1609-395X, URL: http://www.ci.tuwien.ac.at/Conferences/DSC-2003/Proceedings/Ihaka.pdf.
- And others (hclwizard.org reference list).
Some other packages providing color maps in python (on top of the default color maps) wich might be of interest:
- seaborn: statistical data visualization. The package also provides access to a range of (mostly) well specified. color palettes.
- palettable: color palettes for python.
Formely known as
brewer2mpl. Provides a range of color palettes including “Brewer2” and “Carto” palettes.
- ColorBrewer2.org: the source of the brewer colors, interactive webpage by Cynthia Brewer, Mark Harrower and The Pennsylvania State University.
White point implemented but might require some additional testing.
Introduction to the three basic principles of the diverging, sequential, and qualitative color maps.
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/python-colorspace/checkouts/latest/docs/hclcolorspace.rst, line 107.)
Handling of alpha values. And, in addition, add support for hex colors. Currently a list of hex colors as input is not allowed (fix it).
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/python-colorspace/checkouts/latest/colorspace/CVD.py:docstring of CVD.desaturate, line 27.)
Implement the smoothings to improve the look of the plots. Only partially implemented, the spline smoother is missing.
(The original entry is located in /home/docs/checkouts/readthedocs.org/user_builds/python-colorspace/checkouts/latest/colorspace/specplot.py:docstring of specplot.specplot, line 31.)