Python from color name to RGB

前端 未结 2 1914
悲&欢浪女
悲&欢浪女 2021-01-17 14:28

If I have a function which takes color as an input to be edited first (by RGB numbers), and then used in matplotlib.pyplot. How can I

2条回答
  •  再見小時候
    2021-01-17 15:00

    Found the solution, by

    from matplotlib import colors
    orange_rgb = colors.hex2color(colors.cnames['orange'])
    

提交回复
热议问题