[Chimera-users] creating a new color palette - viridis
meng at cgl.ucsf.edu
Fri Mar 22 14:26:31 PDT 2019
That message was about adding palettes to ChimeraX, not Chimera.
Chimera has had Colorbrewer palettes for a long time, and although you can create your own custom palettes using the Palette Editor,
... they are NOT very useful since the only way to use them is as a background gradient. The longer-term goal was to allow using palettes for coloring by value (like bfactor) or sequentially (like N- to C-terminus of a chain), but it was never implemented.
Instead you can specify a series of colors directly in the command “rangecolor” (for coloring by value) or “rainbow” (for coloring sequentially), or choose colors in the corresponding tool GUIs: Color by Attribute or Rainbow.
Viridis looks something like dark blue -> green -> yellow or gold, so you could try something like Chimera command:
(you can experiment with what and how many colors are used; it’s not limited to Chimera named colors, e.g. you could also use hex codes)
In ChimeraX, with the “color” command you can use predefined palettes or specify the series of colors directly in the command. ChimeraX does not have rainbow or color-by-attribute GUIs yet.
In ChimeraX, the command would be something like:
rainbow palette midnightblue:blue:green:gold
I hope this helps,
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco
> On Mar 22, 2019, at 10:03 AM, Saladi, Shyam M. <saladi at caltech.edu> wrote:
> Hello --
> I see that a number of color palettes were added to chimera a little more than a year ago now:
> I would like to try using viridis (https://bids.github.io/colormap/) instead of standard rainbow/spectrum for coloring a protein from its N to C termini. Would someone be able to give me direction on how to create a new a color palette to do this?
> The RGB values making up viridis can directly be found here: here: https://github.com/BIDS/colormap/blob/master/colormaps.py
More information about the Chimera-users