To translate css color names to rgba programmatically, you can use the matplotlib.colors
module, which has a function called to_rgba()
which accepts a named color and returns an rgba value.
This is documented at https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.colors.to_rgba.html.