statsplotly.plot_specifiers.color package¶
This subpackage defines objects and utility methods for color properties.
- pydantic model statsplotly.plot_specifiers.color.ColorSpecifier¶
Bases:
BaseModel- Fields:
barmode (statsplotly.plot_specifiers.layout._core.BarMode | None)color_limits (list[float] | None)color_palette (str | list[str] | None)coloraxis_reference (statsplotly.plot_specifiers.layout._core.ColoraxisReference | None)colorbar (bool | None)colormap (dict[str | numpy.datetime64 | bool, Any] | None)logscale (float | None)opacity (float | None)
- Validators:
check_logscale»logscalecheck_opacity»opacity
- field coloraxis_reference: ColoraxisReference | None = None¶
- classmethod build_from_color_data(color_data: Series, **kwargs: Any) ColorSpecifier¶
- validator check_logscale » logscale¶
- validator check_opacity » opacity¶
- pydantic model statsplotly.plot_specifiers.color.HistogramColorSpecifier¶
Bases:
ColorSpecifier- Fields:
opacity (float)
- Validators:
check_opacity»opacity
- validator check_opacity » opacity¶
- statsplotly.plot_specifiers.color.rgb_string_array_from_colormap(n_colors: int, color_palette: str | list[str] | list[tuple[float, float, float]] | Colormap | None) list[str]¶
Returns a list of RGB string given n_colors and a color_palette reference.
This function attempts to extract RGB color values from built-in Plotly, Seaborn and finally Matplotlib colormaps.