Get colors
- plot_utils.get_colors(N=None, color_scheme='tab10')[source]
Return a list of N distinguisable colors. When N is larger than the color scheme capacity, the color cycle is wrapped around.
- What does each color_scheme look like?
https://matplotlib.org/mpl_examples/color/colormaps_reference_04.png https://matplotlib.org/users/dflt_style_changes.html#colors-color-cycles-and-color-maps https://github.com/vega/vega/wiki/Scales#scale-range-literals https://www.mathworks.com/help/matlab/graphics_transition/why-are-plot-lines-different-colors.html
- Parameters:
N (int or
None
) – Number of qualitative colors desired. If None, returns all the colors in the specified color scheme.color_scheme (str or {8.3, 8.4}) –
Color scheme specifier. Valid specifiers are: (1) Matplotlib qualitative color map names:
’Pastel1’ ‘Pastel2’ ‘Paired’ ‘Accent’ ‘Dark2’ ‘Set1’ ‘Set2’ ‘Set3’ ‘tab10’ ‘tab20’ ‘tab20b’ ‘tab20c’ (https://matplotlib.org/mpl_examples/color/colormaps_reference_04.png)
’tab10_muted’: A set of 10 colors that are the muted version of “tab10”
’8.3’ and ‘8.4’: old and new MATLAB color scheme Old: https://www.mathworks.com/help/matlab/graphics_transition/transition_colororder_old.png New: https://www.mathworks.com/help/matlab/graphics_transition/transition_colororder.png
’rgbcmyk’: old default Matplotlib color palette (v1.5 and earlier)
’bw’ (or ‘bw3’), ‘bw4’, and ‘bw5’ Black-and-white (grayscale colors in 3, 4, and 5 levels)
- Returns:
colors – A list of colors (as RGB, or color name, or hex)
- Return type:
list<list<float>>, list<str>