color_schemes
Module Contents
- class color_schemes.FancyColorSchemes
Color schemes that can be used. Each is a list of hex color codes. The “tol” palettes (ex
qualitative_tol_vibrant_7) are safe for red-green color blindness. For all palettes other than grayscale, colors of black or gray were removed.- classmethod darken_color(color: str, shading: float) str
Darkens a color by a certain fraction.
- Parameters
color – A matplotlib-recognized colors
shading – A float from 0 to 1, with 1 being complete shading
- classmethod darken_palette(palette: Sequence[str], shading: float) Sequence[str]
Darkens a list of colors by a certain fraction.
- Parameters
palette – A sequence of matplotlib-recognized colors
shading – A float from 0 to 1, with 1 being complete shading
- classmethod grayscales() Sequence[str]
A range of grayscale-ISH colors from black to white. Some have slightly more of red, green, or blue.
- classmethod qualitiative_26() Sequence[str]
Special color scheme of 26.
- classmethod qualitative_tol_dark_mod_6() Sequence[str]
“Dark” color scheme from https://personal.sron.nl/~pault/#sec:qualitative. No black and reordered red and yellow.
- classmethod qualitative_tol_high_contrast_6() Sequence[str]
“High-contrast” color scheme from https://personal.sron.nl/~pault/#sec:qualitative. Reordered. No gray.
- classmethod qualitative_tol_vibrant_6() Sequence[str]
“Vibrant” color scheme from https://personal.sron.nl/~pault/#sec:qualitative. Gray was removed.
- classmethod qualitative_tol_muted_9() Sequence[str]
“Muted” color scheme from https://personal.sron.nl/~pault/#sec:qualitative. Gray was removed.
- class color_schemes.FancyCmaps
Very useful colormaps.
- Most importantly:
white_red
white_blue
blue_white
white_black
The built-in matplotlib ones don’t actually go between pure color values!! For ex, ‘Greys’ doesn’t go from pure white to pure black! So colormaps to consider avoiding include Greys, Blues, Greens, (etc), bwr, and seismic. Matplotlib still has good built-in colormaps, including viridis and plasma.
- classmethod white_red(*, bad: str = '333333') matplotlib.colors.Colormap
A colormap from pure white to pure red.
- classmethod white_blue(*, bad: str = '333333') matplotlib.colors.Colormap
A colormap from pure white to pure blue.
- classmethod blue_white(*, bad: str = '333333') matplotlib.colors.Colormap
A colormap from pure white to pure blue.
- classmethod white_black(*, bad: str = '333333') matplotlib.colors.Colormap
A colormap from pure white to pure black.
- classmethod blue_white_red(*, bad: str = '333333') matplotlib.colors.Colormap
A colormap from pure blue to pure red.