Now that you mention "info" I realized you can get atom colors as RGBA in ranges 0-255 using the existing "info atoms" command. However, RGBA 0-255 is probably not as convenient as hex codes, even though it is also possible to color
using that information. Example of using "info atoms"
open 2gbp
hide ribbons
view /A:16
info atoms /A:16 attribute color
....gives in the Log
atom id /A:16@N color 48,80,248,255
atom id /A:16@CA color 210,180,140,255
atom id /A:16@C color 210,180,140,255
atom id /A:16@O color 255,13,13,255
atom id /A:16@CB color 210,180,140,255
atom id /A:16@CG color 210,180,140,255
atom id /A:16@CD1 color 210,180,140,255
atom id /A:16@CD2 color 210,180,140,255
atom id /A:16@CE1 color 210,180,140,255
atom id /A:16@CE2 color 210,180,140,255
atom id /A:16@CZ color 210,180,140,255
And you can set a color using RGBA 0-255 values in a command such as:
color /A:16 rgba(255,13,13,255)
Similarly you can get RGBA colors with the existing "info residues" command
info residues /A:48 attribute ribbon_color
Selected attribute names are listed here:
<
https://rbvi.ucsf.edu/chimerax/docs/user/attributes.html#residue>
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco
> On Sep 1, 2023, at 12:35 PM, Tom Goddard via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
>
> Hi Donna,
>
> I added "info atomcolor" and "info rescolor" commands to report colors using hex codes in tomorrow's ChimeraX daily build (dated September 2, 2023). For example,
> > info rescolor /A:16
> #1/A:16 color #d2b48c
>
> > info atomcolor /A:16
> #1/A:16@N color #3050f8
> #1/A:16@CA color #d2b48c
> #1/A:16@C color #d2b48c
> #1/A:16@O color #ff0d0d
> #1/A:16@CB color #d2b48c
> #1/A:16@OG color #ff0d0d
>
>
> Tom
>
>
>> On Sep 1, 2023, at 9:28 AM, Elaine Meng via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
>>
>> Hello Donna,
>> Not a command, but you can do it by clicking various color wells, which will call up your system color editor. The system color editor should have some way of showing the hex code of the color. I say "system color editor" because it just uses the built-in
color editor of your computer system, so it will be different on Mac vs. Windows vs. Linux.
>>
>> E.g.
>> For model color you click the color well (small square with color in it) in the Models panel.
>>
>> For atom color:
>> You would do it by selecting the atom (Ctrl-click in graphics window), then opening the Selection Inspector by clicking the green magnifying glass icon in the Home tab of the Toolbar, or by choosing menu: Actions... Inspect. In that tool, Inspect: Atoms,
click the "Color" color well.
>>
>> <
https://rbvi.ucsf.edu/chimerax/docs/user/tools/inspector.html>
>>
>> For ribbon (cartoon) color:
>> Ctrl-click to select part of ribbon, open the Selection Inspector as above, Inspect: Residues and use the "Cartoon color" color well instead.
>>
>> I hope this helps,
>> Elaine
>> -----
>> Elaine C. Meng, Ph.D.
>> UCSF Chimera(X) team
>> Department of Pharmaceutical Chemistry
>> University of California, San Francisco
>>
>>> On Sep 1, 2023, at 12:49 AM, Matzov Donna via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
>>>
>>> Hello,
>>> I was wondering if there's a command that would give me the HEX code of a particular atomspec.
>>> Using the "pick from screen" option in the color editor is somewhat helpful samples the colors that are the results of shadows so I can't really the exact color.
>>>
>>> Thanks,
>>> Donna Matzov, PhD
>>> Department of Structural Biology
>>> Weizmann Institute of Science
>>> The Shalev-Benami Lab
>>
>>
>> _______________________________________________
>> 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/
>>
>
> _______________________________________________
> 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/