Get color code of a custom color

I created a custom color that I want to use in a different session. is there a way to do that besides trying to match colors by eye? Regards.

Hi there! Resuscitating this old post because I felt in a similar problem as Ahmad. I don't know if the color picker existed in 2020, but nowadays one can use it to pick any color, even outside ChimeraX. Action->Color->Custom, then the little glass dropper, center on the right color and click. Once the color has been cloned, Elaine's strategy can be used to save it for later use. (I'm still learning ChimeraX, so posting in case I forget this myself...) Cheers and keep it up!

Hi Carlos, When you use the eye-dropper to pick a color in the Mac color chooser panel it reports the hex code for the exact color on the screen. But that color includes a brighness that depends on the lighting ChimeraX is using, parts of a ribbon or atom not facing the viewer will appear darker and parts facing forward will appear brighter. So if you then apply that color to some other object, e.g. a different atom it won't actually come out looking the same as the ribbon or atom you got the color from because the brightness will not match. The ChimeraX commands info atomcolor sel #1/A:351@OH color #ff0d0d info rescolor sel #1/A:351 color #d2b48c will give the actual atom or ribbon color of the selected atom or residue without being modulated by the lighting. Tom
On Feb 7, 2025, at 9:43 PM, Carlos Kikuti via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi there!
Resuscitating this old post because I felt in a similar problem as Ahmad. I don't know if the color picker existed in 2020, but nowadays one can use it to pick any color, even outside ChimeraX. Action->Color->Custom, then the little glass dropper, center on the right color and click. Once the color has been cloned, Elaine's strategy can be used to save it for later use.
(I'm still learning ChimeraX, so posting in case I forget this myself...)
Cheers and keep it up! _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

A-ha, Yes, although the picker is still very useful – I was picking from presentations, images on the web… but that’s true, one needs to be very careful when picking. For copying colors from a ChimeraX session your procedure is much better indeed, and I didn’t know it. Thanks a lot! --------------------------------------------------- Carlos KIKUTI, PhD UMR144 - CNRS - Institut Curie Pavillon Trouillet Rossignol 26 Rue d’Ulm - 75005 Paris, France carlos.kikuti@curie.fr<mailto:carlos.kikuti@curie.fr> De : Tom Goddard <goddard@sonic.net> Date : lundi, 10 février 2025 à 20:27 À : Kikuti Carlos <Carlos.Kikuti@curie.fr> Cc : chimerax-users@cgl.ucsf.edu <chimerax-users@cgl.ucsf.edu> Objet : Re: [chimerax-users] Get color code of a custom color WARNING: This email originated from outside of Institut Curie. Please validate the sender's email address before clicking on links or attachments as they may not be safe. Hi Carlos, When you use the eye-dropper to pick a color in the Mac color chooser panel it reports the hex code for the exact color on the screen. But that color includes a brighness that depends on the lighting ChimeraX is using, parts of a ribbon or atom not facing the viewer will appear darker and parts facing forward will appear brighter. So if you then apply that color to some other object, e.g. a different atom it won't actually come out looking the same as the ribbon or atom you got the color from because the brightness will not match. The ChimeraX commands info atomcolor sel #1/A:351@OH color #ff0d0d info rescolor sel #1/A:351 color #d2b48c will give the actual atom or ribbon color of the selected atom or residue without being modulated by the lighting. Tom
On Feb 7, 2025, at 9:43 PM, Carlos Kikuti via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi there!
Resuscitating this old post because I felt in a similar problem as Ahmad. I don't know if the color picker existed in 2020, but nowadays one can use it to pick any color, even outside ChimeraX. Action->Color->Custom, then the little glass dropper, center on the right color and click. Once the color has been cloned, Elaine's strategy can be used to save it for later use.
(I'm still learning ChimeraX, so posting in case I forget this myself...)
Cheers and keep it up! _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Hi Ahmad, When you were doing the coloring (i.e. when you made the color), if you used a Color Chooser dialog it may show the hex code or R,G,B component values for the color. If you know either of these definitions of the color, then you can define a color name for that with the “color name” command. <http://rbvi.ucsf.edu/chimerax/docs/user/commands/color.html#name> Then to have this color and its name whenever you use ChimeraX, you could put that “color name” command in your Preferences in the Startup section. <http://rbvi.ucsf.edu/chimerax/docs/user/preferences.html> <http://rbvi.ucsf.edu/chimerax/docs/user/preferences.html#startup> If you did the coloring in the past but don’t remember now the hex code or R,G,B values it may be possible to look it up in ChimeraX, e.g. if it is the model color shown in the square in the Model panel, if you click the square it will bring up the Color Chooser already set to that color. However, in general if it was just used for some specific atoms or residues, there isn’t a way to go backwards to look it up. Some apps (Photoshop maybe?) have a feature where you can sample any part of your screen and it will tell you the color definition, but there is nothing like that in ChimeraX. I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Feb 9, 2020, at 12:10 AM, Ahmad Khalifa <underoath006@gmail.com> wrote:
I created a custom color that I want to use in a different session.
is there a way to do that besides trying to match colors by eye?
Regards.
participants (5)
-
Ahmad Khalifa
-
Carlos Kikuti
-
Elaine Meng
-
Kikuti Carlos
-
Tom Goddard