midlearn.color_theme
- class midlearn.color_theme(theme: str | list[str] | color_theme, **kwargs)[source]
Color themes for graphics.
- __init__(theme: str | list[str] | color_theme, **kwargs)[source]
Initialize color theme object
- Parameters:
theme (str or list of str or color_theme) – The name of the theme (str), a list of custom colors (list[str]), or an existing color_theme object.
**kwargs (dict) – Additional keyword arguments passed to the midr::color.theme() function in R.
Methods
__init__
(theme, **kwargs)Initialize color theme object
palette
(n)Return a list of colors of specified length.
ramp
(x)Return a list of colors based on the specified list of values.