5.7.3 Color

By default, the atoms in a molecule are colored according to their element types and the bonds in a molecule are colored according to the element types of the two atoms defining that bond. There are two color palettes that specify the actual colors used for a given element, one for use with dark-colored backgrounds and the other for use with light-colored backgrounds. Both of these palettes can be viewed and modified in the application preferences (see chapter 12). The dark-background atom color palette can be seen in Figure 5.5(a).

Figure 5.5: Dark background atom and residue color palettes
 
[Atom Color Palette] atomcolors.png [Residue Color Palette] residuecolors.png

In addition to the default atom coloring scheme, individual atom and bond colors can be set to a specific color by clicking on the first button in Color section on the Molecules page of the Style Window (see Figure 5.3). Unless bond colors are specifically set, they will continue to be colored based on the coloring of the two atoms defining that bond.

The second button in the Color section on the Molecules page of the Style Window applies a ``reference" coloring to the atoms and bonds in the current scope. The ``reference" coloring simply sets all of carbon atoms to be the ``Reference Color" (the default is green). This provides an easy mechanism to distinguish to similarly shaped molecules without obscuring their chemistry.

The third button in this section is similar to the second button in that it colors all of the carbon atoms in the specified scope. The main difference is that it launches a dialog to allow the user to select the desired color instead of using the default application ``Reference Color''.

The fourth button in this section colors atoms and bonds based on their residue membership. The application contains two residue-based coloring palettes (for dark- and light-backgrounds) much like the element-based scheme described above. These palettes can also be viewed and modified in the application preferences. The default coloring scheme for residues is the ``Shapely" coloring scheme. For more details on the ``Shapely" coloring scheme, please refer to the scripting API documentation of the AtomColorResidueScoped command. The dark background residue color palette can be seen in Figure 5.5(b).

The fifth button in this section colors each molecule (or atoms if selected) a unique color. For sufficiently large sets, the colors used may be repeated.

Finally, the sixth button in this section restores the default atom and bond element type coloring.