prolint.plotting.theme¶
ProLint theme and color utilities.
This module provides color schemes, gradients, and styling functions for consistent visualization across ProLint plots.
Attributes¶
Functions¶
|
Convert hex color string to RGB tuple. |
|
Interpolate a color from a gradient based on value. |
|
Get a hex color for a value from a discrete color scale. |
|
Get display label for a time unit. |
|
Get a matplotlib colormap by name. |
|
Interpolate a color from a gradient based on value. |
Apply ProLint plotting style to matplotlib. |
Module Contents¶
- prolint.plotting.theme.hex_to_rgb(hex_color: str) Tuple[int, int, int][source]¶
Convert hex color string to RGB tuple.
- prolint.plotting.theme.interpolate_gradient(value: float, min_val: float, max_val: float, gradient_name: str = 'sharedContacts') Tuple[float, float, float, float][source]¶
Interpolate a color from a gradient based on value.
- Parameters:
- Returns:
Interpolated RGBA color values (0-1 range).
- Return type:
- prolint.plotting.theme.get_color_for_value(value: float, scale_name: str = 'prolint', vmin: float = 0, vmax: float = 1) str[source]¶
Get a hex color for a value from a discrete color scale.
- prolint.plotting.theme.get_colormap(name: str = 'viridis')[source]¶
Get a matplotlib colormap by name.
- Parameters:
name (str, default="viridis") – Color scale name from COLOR_SCALES.
- Returns:
Matplotlib colormap object.
- Return type:
LinearSegmentedColormap
- Raises:
ValueError – If name is not a valid color scale.