register_colors

register_colors(user=True, default=False, space='hcl', margin=0.1)[source]

Register the open-color colors, XKCD color survey colors, and colors saved to the ~/.proplot/colors folder. This is called on import. The color survey colors are filtered to a subset that is “perceptually distinct” in the HCL colorspace. The user color names are loaded from .txt files saved in ~/.proplot/colors. Each file should contain one line per color in the format name : hex. Whitespace is ignored.

To visualize the registered colors, use show_colors.

Parameters
  • user (bool, optional) – Whether to reload user colors. Default is True.

  • default (bool, optional) – Whether to reload default proplot colors. Default is False.

  • space ({‘hcl’, ‘hsl’, ‘hpl’}, optional) – The colorspace used to detect “perceptually distinct” colors.

  • margin (float, optional) – The margin by which a color’s normalized hue, saturation, and luminance channel values must differ from the normalized channel values of the other colors to be deemed “perceptually distinct.”