Computer screen colors are made up from light intensities of three primary colors, Red, Green, and Blue (RGB). Hence, any color can be specified as an RGB triplet of intensity values. Usually, each intensity can range from 0 to 255 decimal, which is 00 to FF hexadecimal.
RasMol's color command uses decimal RGB triplets, whereas HTML requires hexadecimal triplets. This is why both forms are given below. To make the word Nitrogen appear in RasMol's CPK color for nitrogen [143,143,255], the HTML syntax is <font color="#8F8FFF">Nitrogen</font>.
Chime 2.0 can accept color commands in hexadecimal as well as RasMol-style decimal. In Chime 2.0, the selected atoms can be colored, for example, dark green with the command "color [x00A000]", which simplifies the construction of html text with a matching color.
For converting decimal values to hexadecimal and vice versa, in Windows 95: Start, Programs, Accessories, Calculator. Enter a decimal number and select Hex.
If you frequently wish to use a color not predefined, you can write a one-line script. For example, if you make the file gray.spt containing the line
color [180,180,180] #grey
then the command script "gray.spt" colors the currently selected atom set gray. (In commands, RasMol accepts both British and American spellings, e.g. colour or color). The advantage is that if you later wish to change the color, you need change only the RGB values in the script file, and then everywhere this script is used, the color will become the new shade automatically.
The RGB values below have been verified with the source code for RasMol version 2.6 beta 2a (file transfor.c).
NAME RASMOL HTML black [0,0,0] 00 00 00 white [255,255,255] FF FF FF blue [0,0,255] 00 00 FF green [0,255,0] 00 FF 00 red [255,0,0] FF 00 00 yellow [255,255,0] FF FF 00 magenta [255,0,255] FF 00 FF cyan [0,255,255] 00 FF FF orange [255,165,0] FF A5 00 redorange [255,69,0] FF 45 00 violet [238,130,238] EE 82 EE purple [160,32,240] A0 20 F0 greenblue [46,139,87] 2E 8B 57Be careful: these names do not give the same colors in HTML.
ELEMENT COLOR NAME RGB DECIMAL RGB HEXADECIMAL Carbon light grey [200,200,200] C8 C8 C8 Oxygen red [240,0,0] F0 00 00 Hydrogen white [255,255,255] FF FF FF Nitrogen light blue [143,143,255] 8F 8F FF Sulphur sulphur yellow [255,200,50] FF C8 32 Chlorine, Boron green [0,255,0] 00 FF 00 Phosphorus, Iron, Barium orange [255,165,0] FF A5 00 Sodium blue [0,0,255] 00 00 FF Magnesium forest green [34,139,34] 22 8B 22 Zn, Cu, Ni, Br brown [165,42,42] A5 2A 2A Ca, Mn, Al, Ti, Cr, Ag dark grey [128,128,144] 80 80 90 F, Si, Au goldenrod [218,165,32] DA A5 20 Iodine purple [160,32.240] A0 20 F0 Lithium firebrick [178,34,34] B2 22 22 Helium pink [255,192,203] FF C0 CB Unknown deep pink [255,20,147] FF 14 93See the Manual for a color-graphic summary of the CPK colors.
The RasMol structure color scheme colors the molecule by protein secondary structure.
Structure Decimal RGB Hex RGB Alpha helices red-magenta [255,0,128] FF 00 80 * Beta strands yellow [255,200,0] FF C8 00 * Turns pale blue [96,128,255] 60 80 FF Other white [255,255,255] FF FF FF *Values given in the 1994 RasMol 2.5 Quick Reference Card ([240,0,128] and [255,255,0]) are not correct for RasMol 2.6-beta-2a. This correction was made above on Dec 5, 1998.The secondary structure is either read from the PDB file (HELIX and SHEET records), if available, or determined using Kabsch and Sander's DSSP algorithm. The RasMol structure command may be used to force DSSP's structure assignment to be used.
If you wish to use a custom coloring scheme, it is typically much simpler to construct a short script to accomplish this than to insert values into the PDB file. The script also has the advantage that it can be invoked for any currently displayed molecule. An example of such a script is contained in the Chime Template as file cs_amphi.spt (Color Scheme AMPHIpathic).
define temporary selected select protein color [208,208,208] #gray select protein and backbone color [100,50,100] #dull magenta select protein and not (hydrophobic or backbone) color magenta select temporaryThe first and last lines make sure that whatever was selected before the script was run remains selected after it is finished. If you want the color scheme to apply ONLY to what is selected before the script is run, use this form:
define temporary selected select protein and selected color [208,208,208] #gray select protein and backbone and selected color [100,50,100] #dull magenta select protein and not (hydrophobic or backbone) and selected color magenta select temporary