omicverse.pl.create_custom_colormap#
- omicverse.pl.create_custom_colormap(cell_color, *, name='custom_transparent', N=100)[source]#
Build a transparent-to-opaque LinearSegmentedColormap of a single colour.
The colormap maps value 0 to the given colour at alpha 0 (fully transparent) and value 1 to alpha 1 (fully opaque), keeping the RGB channels constant. Useful for overlaying one cell-type / marker density over a morphology image without masking it — low values disappear into the background, high values pop in the base colour.
- Parameters:
- Returns:
A colormap whose alpha channel grows linearly from 0 to 1.
- Return type: