How to create a RGB color Table

Vlastimil Brom vlastimil.brom at gmail.com
Mon Jun 17 15:11:57 EDT 2019


po 17. 6. 2019 v 11:30 odesílatel Jorge Conrado Conforte
<jorgconforte at hotmail.com> napsal:
>
> HI,
>
> Please someone could help me. How can I create a new color table with the values of r g and b that I have. I use the Mataplolib color tables. However, I would like to use a new color table with the respective r g b values that I have.
>
> Thank you.
>
>...

Hi,
I am not sure, this is exactly what you are looking for, but there
seems to be a similar topic covered in matplotlib docs:
https://matplotlib.org/3.1.0/tutorials/colors/colormap-manipulation.html#creating-listed-colormaps

It seems, you can just pass the multidimensional sequence to
ListedColormap from matplotlib.colors
There needs to be an alpha value too - i.e. RGBA

hth,
vbr



More information about the Python-list mailing list