lookup_color¶
- ginga.colors.lookup_color(name, format='tuple')[source]¶
Find RGB or hex values for a supported color.
- namestr
Color name (e.g.,
'red'
) or hash (e.g.,'#ff0000'
). Color name is case-sensitive.- format{‘tuple’, ‘hash’}
Desired output to be an RGB tuple or hash.
- Returns:
- colortuple or str
Color value as specified by
format
.
- Raises:
- KeyError
Color name is not supported.
- ValueError
Invalid format.