Hello I am a Pymol user

I want to color all alpha carbons (ca) and beta carbons (cb) from a certain ressidue in different color. How can I do this?

I selected the spheres with:

show spheres, C/1-9/ca 
show spheres, C/1-9/cb

and if I use

set sphere_color, theColor

I color all the spheres what I don't want.

according to: color gold, resi 200-­‐221
I tried gold, spheres, C/1-9/ca but this didn't work

  • 1
    $\begingroup$ Hi @Elias whilst your question is certainly answerable it is etiquette to provide a few more details about your investigation. Past posts do answer this specific question $\endgroup$
    – M__
    Nov 7, 2020 at 11:35

2 Answers 2



So how PyMOL stores how it shows atoms is that each atom has a colour and a represention, which is a binary number telling what to show. Therefore the colour for spheres is the same as the colour for sticks. The only way round this is to copy the object (create copycat, original and you set copycat differently)

To set the atom you do

select iliketheschaps, resi 200‐221 and name CA+CB
color tv_green, iliketheschaps
show spheres, iliketheschaps

The object iliketheschaps is a selection. Do make sure the range is a hyphen-minus (character next to 0) as opposed to an en-dash (–) which Word subs and on a mac you get with cmd+-

non-PyMOL colours

Now you asked for "gold". This is not a colour in the menu —famous for the colour limon. Gold is a CSS colour name, but it won't work. You will have to colour by hex code. Say you want "gold" you need to google the colour name and hex. #FFD700.

color 0xFFD700, iliketheschaps

The Fashion Police have been alerted

This paragraph is in jest.

However, as you may know bioinformaticians are very fashion savvy for colours. Mustard was the in-colour from last year, so you really ought to use mustard (0xffdb58). This year is all about nectarine (0xffa168) (which is not salmon —this ain't 2015!). Coral (0xff7f50) and teal (0x008080) were from previous years and are still are going strong!


show sphere, A/1/C

set sphere_color, red, A/1/C

  • $\begingroup$ Please add some explanation to your answer, and format code lines better. As it stands, this post is low quality and might be deleted. $\endgroup$
    – Ram RS
    Aug 23, 2021 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.