opendvp.utils.parse_color_for_qupath#
- opendvp.utils.parse_color_for_qupath(color_dict, adata, adata_obs_key)#
Parse and convert color definitions to a format compatible with QuPath.
- Return type:
Parameters#
- color_dictdict
Dictionary mapping category names to color definitions (RGB tuples, lists, or hex strings).
- adataad.AnnData
AnnData object containing observation data.
- adata_obs_keystr
Key in adata.obs specifying the categorical variable to assign colors to.
Returns:#
- dict
Dictionary mapping category names to [R, G, B] lists with values in the range 0-255.