def rgb_from_name(color_name): rgb_norm = mcolor.hex2color(mcolor.cnames[color_name]) rgb = [int(x * 255) for x in rgb_norm] return rgb