Usage:
rainbow model_number(s)

Rainbow colors each chain in the specified model(s) (all models if none are specified) from red to blue, transiting through yellow, green, and cyan in the process. This may help in visually tracing molecule chains. Since protein PDB files are ordered from N- to C-terminus, rainbow colors the N-terminus of each peptide chain red and the C-terminus blue.

The model numbers can be preceded by #, as in a normal atom specification, or they can be given without #. Even if a narrower atom specification is given, the entire model(s) containing the specified atoms will be acted upon. If no model numbers are given, all molecule models will be affected.

Rainbow spreads the color gradient across each entire chain in the specified model(s), even if part of the chain is not displayed. Each residue in a chain is assigned a different color.

Visible atom 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. The command rainbow sets both individual atom colors (although atoms within a residue are given the same color) and per-residue ribbon colors.

See also: color, ribcolor, ribbon, surfcolor