sepal_ui.scripts.utils.set_type#
- sepal_ui.scripts.utils.set_type(color)[source]#
Return a pre-defined material colors based on the requested type_ parameter.
If the parameter is not a predefined color, fallback to “info” and will raise a warning. the colors can only be selected from [“primary”, “secondary”, “accent”, “error”, “info”, “success”, “warning”, “anchor”].
- Parameters:
color (str) – the requested color
- Returns:
a pre-defined material color
- Return type:
str
New in version 2.7.1.