Web Analytics Made Easy - Statcounter
Skip to content

Color schemes#

A color scheme answers one rendering question: how should this object be colored?

Use color schemes when your extension needs to color structural content or visual models according to rules such as element type, residue, chain, model membership, or a scalar property.

The main class family is exposed through api/classSBDDataGraphNodeColorScheme.md.

Mental model#

Color schemes are part of the visual layer, not the scientific model itself.

They can be applied to a data graph node, and when they are applied at one node, they affect that node and its descendants. This makes them a practical way to impose a coherent coloring rule over part of a hierarchy.

Color schemes usually work together with materials:

  • the material controls the broader rendering appearance
  • the color scheme decides which colors are assigned

Where color schemes are used#

Color schemes can be applied to:

  • structural nodes, such as atoms and bonds
  • visual models, such as custom representations or field visualizations

Typical use cases include:

  • uniform highlighting
  • per-element coloring
  • per-chain coloring
  • coloring by residue or secondary structure
  • coloring by a numeric attribute such as temperature factor

Colors#

See also

SBColor

Available color schemes#

The built-in schemes fall into a few common families.

Choosing a scheme#

As a rule of thumb:

  • use a constant scheme for highlighting or quick visual overrides
  • use a per-element scheme for chemically meaningful default coloring
  • use a per-attribute scheme when the color should convey data

See also#