get_color¶
- marxs.visualization.utils.get_color(d)[source] [edit on github]¶
Look for color information in dictionary.
If missing, return white. This function checks if the
d['color']
is a valid RGB tuple and if not it imports amatplotlib.colors.ColorConverter
to convert any matplotlib compatible string to an RGB tuple.- Parameters:
- ddict
Color information should be present in
d['color']
.
- Returns:
- colortuple
RGB tuple with each element in the range 0..1