nichecompass.utils.create_new_color_dict

nichecompass.utils.create_new_color_dict(adata, cat_key, color_palette='default', overwrite_color_dict={'-1': '#E1D9D1'}, skip_default_colors=0)

Create a dictionary of color hexcodes for a specified category.

Parameters:
  • adata – AnnData object.

  • cat_key – Key in ´adata.obs´ where the categories are stored for which color hexcodes will be created.

  • color_palette (default: 'default') – Type of color palette.

  • overwrite_color_dict (default: {'-1': '#E1D9D1'}) – Dictionary with overwrite values that will take precedence over the automatically created dictionary.

  • skip_default_colors (default: 0) – Number of colors to skip from the default color dict.

Returns:

new_color_dict: The color dictionary with a hexcode for each category.