[chimerax-users] [EXT] Re: Change luminance in color palette
Scott, Brandon L.
Brandon.Scott at sdsmt.edu
Mon Nov 7 08:04:48 PST 2022
Hi Elaine,
Thanks for this clarity! I was having a moment there trying to describe what I was after. It was actually much simplier, I just wanted to make a composite colormap with green and magenta, which is working now 🙂
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<mailto:Brandon.Scott at sdsmt.edu>
[South Dakota Mines]<https://www.sdsmt.edu/>
________________________________
From: Elaine Meng <meng at cgl.ucsf.edu>
Sent: Thursday, October 20, 2022 4:59 PM
To: Scott, Brandon L. <Brandon.Scott at sdsmt.edu>
Cc: ChimeraX-users at cgl.ucsf.edu <chimerax-users at cgl.ucsf.edu>
Subject: [EXT] Re: [chimerax-users] Change luminance in color palette
*** This email is from an EXTERNAL sender. Use CAUTION before opening attachments or clicking links.***
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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Frbvi.ucsf.edu%2Fchimerax%2Fdocs%2Fuser%2Fcommands%2Fcolor.html%23palette-options&data=05%7C01%7CBrandon.Scott%40sdsmt.edu%7Cdcc38382edc243a1ad1c08dab2eecbed%7C867083e60b14435f9b4e8be26f01d84e%7C0%7C0%7C638019035950569889%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=mtgyrR1hPDTQMzxeIuRbWO56AngJ9yXcpT2OJBpoCF8%3D&reserved=0>
<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Frbvi.ucsf.edu%2Fchimerax%2Fdocs%2Fuser%2Fcommands%2Fcolornames.html&data=05%7C01%7CBrandon.Scott%40sdsmt.edu%7Cdcc38382edc243a1ad1c08dab2eecbed%7C867083e60b14435f9b4e8be26f01d84e%7C0%7C0%7C638019035950569889%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=cTRMl6hE61s%2BFgPrehRvva6C99aWKELuffQFRv7KmIk%3D&reserved=0>
However, if you were looking for some (semi)automatic way to scale a set of existing colors, see "color modify":
<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Frbvi.ucsf.edu%2Fchimerax%2Fdocs%2Fuser%2Fcommands%2Fcolor.html%23modify&data=05%7C01%7CBrandon.Scott%40sdsmt.edu%7Cdcc38382edc243a1ad1c08dab2eecbed%7C867083e60b14435f9b4e8be26f01d84e%7C0%7C0%7C638019035950569889%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IiGaXhmOV2qGlom5C8klrmut%2BwwlapzUvyhaBbfn5%2FA%3D&reserved=0>
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://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.rbvi.ucsf.edu%2Fmailman%2Flistinfo%2Fchimerax-users&data=05%7C01%7CBrandon.Scott%40sdsmt.edu%7Cdcc38382edc243a1ad1c08dab2eecbed%7C867083e60b14435f9b4e8be26f01d84e%7C0%7C0%7C638019035950569889%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=X8EzktVnzGwQFsO39rl7z4bVz4isFupMyecIQYG4JXg%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20221107/abd9438b/attachment.html>
More information about the ChimeraX-users
mailing list