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
See also
Colors#
See also
Available color schemes#
The built-in schemes fall into a few common families.
- Constant color schemes
- Constant: applies one color uniformly
-
Constant (illustrate): mostly uniform, with a lightened treatment for some atom types
-
Per-element color schemes
- Per element: classic CPK coloring; the default for many structural models
- Per element (custom carbons)
- Per element (per chain carbons)
-
Per-attribute color schemes
- Per attribute: base family for color mapping driven by node attributes and palettes
SBDColorSchemePerChainIDSBDColorSchemePerChainIllustrateSBDColorSchemePerFormalChargeSBDColorSchemePerOccupancySBDColorSchemePerPartialChargeSBDColorSchemePerResidueHydrophobicitySBDColorSchemePerResidueSequenceNumberSBDColorSchemePerResidueTypeSBDColorSchemePerSecondaryStructureTypeSBDColorSchemePerSideChainChargeSBDColorSchemePerSideChainPolaritySBDColorSchemePerStructuralModelSBDColorSchemePerStructuralModelIllustrateSBDColorSchemePerTemperatureFactor
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