sepal_ui.scripts.utils.to_colors#
- sepal_ui.scripts.utils.to_colors(in_color, out_type='hex')[source]#
Transform any color type into a color in the specified output format.
Available format: [hex]
- Parameters:
in_color (str | Sequence) – It can be a string (e.g., ‘red’, ‘#ffff00’, ‘ffff00’) or RGB tuple (e.g., (255, 127, 0)).
out_type (str) – the type of the output color from [‘hex’]. default to ‘hex’
- Returns:
The color in the specified format. default to black.
- Return type:
str | tuple