Color spaces
The colorspace package supports the following color spaces (see also Color Spaces: Classes and Utilities). These classes all inherit from one superclass colorobject
which provides a series of useful methods.
.to() |
Convert colors between color spaces |
.colors() |
Extract HEX colors |
.hclplot() |
Palette plot in HCL space |
.specplot() |
Color spectrum plot |
.swatchplot() |
Palette swatch plot |
HCL-based palettes
colorspace comes with a variety of pre-defined palettes (see hcl_palettes
and HCL-Based Color Palettes) which can either be used as is, or customized. In addition, fully customized palettes can be created/defined. All classes inherit from the superclass hclpalette
providing the same functionality. The main methods are listed below.
.colors() |
Draw colors from the palette |
.cmap() |
Create matplotlib compatible colormap |
.hclplot() |
Palette plot in HCL space |
.specplot() |
Color spectrum plot |
.swatchplot() |
Palette swatch plot |
.show_settings() |
Show palette settings (trajectory definition) |
Custom palettes
Besides HCL-based color palettes which are defined by their trajectories trough the HCL space (see HCL-Based Color Palettes: Construction Details), colorspace provides the palette
class to set up custom palettes based on a fixed number of colors, providing similar functionality as the HCL-based palettes. The main methods are listed below.
palette |
Create custom color palette |
.colors() |
Draw colors from the palette |
.cmap() |
Create matplotlib compatible colormap |
.hclplot() |
Palette plot in HCL space |
.specplot() |
Color spectrum plot |
.swatchplot() |
Palette swatch plot |
.show_settings() |
Show palette settings (trajectory definition) |
Palette visualization and assessment
To visually assess sets of colors (or color palettes), colorspace provides a series of plotting function. These are also interfaced by the identically named methods of the different palette classes listed above.
GUI for choosing color palettes
choose_palette |
Graphical User Interface for Choosing HCL Color Palettes |
Color vision defficiency emulation
Color manipulation and utilities