pycsamt.map.styles#

Style helpers for pyCSAMT map renderers.

Functions

is_dark_theme([theme])

Return True for dark map styling.

theme_colors([theme])

Return a copied color palette for theme.

to_plotly_cmap(cmap[, fallback])

Return a Plotly-compatible colorscale name.

pycsamt.map.styles.to_plotly_cmap(cmap, fallback='plasma')[source]#

Return a Plotly-compatible colorscale name.

Parameters:
  • cmap (str | None)

  • fallback (str)

Return type:

str

pycsamt.map.styles.theme_colors(theme='light')[source]#

Return a copied color palette for theme.

Parameters:

theme (Literal['light', 'dark', 'publication'])

Return type:

dict[str, str]

pycsamt.map.styles.is_dark_theme(theme='light')[source]#

Return True for dark map styling.

Parameters:

theme (Literal['light', 'dark', 'publication'])

Return type:

bool