The command rainbow colors successive residues, chains, models, or protein secondary structure elements over a specified color range.
If atom-spec is blank, every biopolymer chain will be colored, with the color changing per residue. The default color list is blue, cyan, green, yellow, and red, in that order. Thus, rainbow without any arguments will color the residues in each chain from blue through the rainbow spectrum to red (peptides from N-terminus to C-terminus, nucleic acids from 5' end to 3' end). Although a narrower atom-spec may be supplied, the entire model(s) containing the specified atoms will be affected. The coloring cannot be limited to a subset of the polymer chains in a model or to a subset of the residues in a chain except as noted below for the level:
Two or more color names color1, color2, etc. can be supplied as a comma-separated list. Each can be any color name that specifies a single color, except that R,G,B[,A] tuples cannot be used. If two names are given, they designate the starting and ending colors; if more than two names are given, they designate the starting color, intermediate color(s), and ending color. The Rainbow tool is a graphical implementation of rainbow in which five colors are used.
Apparent color is determined by a hierarchy; briefly, atom colors assigned on a per-atom basis and ribbon colors assigned on a per-residue basis override the model-level color. When coloring per residue or chain, rainbow sets individual atom colors and per-residue ribbon colors; when coloring per model, it sets model-level colors and removes any atom-level and ribbon color assignments within the models.
See also: color, rangecolor, ribbon, ribcolor, scolor, transparency, msc, PipesAndPlanks