git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to create a RGB color Table


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