[chimerax-users] Change luminance in color palette
Elaine Meng
meng at cgl.ucsf.edu
Thu Oct 20 15:59:49 PDT 2022
Hi Brandon!
There is no built-in capability for 2D palettes.
You can use RGB, Hex, etc. to define the colors in a palette, so it can be any colors you want, see the "color1:color2:color3" or "value,color" pairs options:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#palette-options>
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/colornames.html>
However, if you were looking for some (semi)automatic way to scale a set of existing colors, see "color modify":
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#modify>
That command allows adjusting lightness (not sure if that is the same as luminance) but because different colors start out at different lightnesses, applying uniform scaling is likely to make some values "max out" sooner than others, losing the distinction among them. You can experiment with it and see what you think, however.
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco
> On Oct 20, 2022, at 2:03 PM, Scott, Brandon L. via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>
> I am coloring surfaces using palettes (purples or a custom green-white-magenta). These both have a single luminance value, is it possible to generate a color palette that also has changing luminance. The ideal palette would be green -> white -> magenta along the color axis, and 0 - > 255 scaling the luminance of the rgb. We would effectively have a color bar matrix that goes from dark green to black to dark magenta if the values are low and bright green to white to bright magenta if the values are high.
>
> Thanks for your insights!
> -Brandon
>
> Brandon Scott, PhD
> CZI Imaging Scientist, Assistant Professor
> Nanoscience & Biomedical Engineering
> South Dakota Mines
> EEP 229
> 501 E. Saint Joseph St., Rapid City, SD 57701
> 724.510.1253 | Brandon.Scott at sdsmt.edu
>
>
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
More information about the ChimeraX-users
mailing list