ColorschemeSpec
Source: colors.ts
Atom coloring by a built-in scheme name, a numeric property gradient, or a
discrete property-to-color map. Property lookup checks atom.properties before
top-level AtomSpec fields. A colorscheme takes precedence over a fixed style color.
For numeric comparisons across models, provide the same min/max or gradient range.
Properties
gradient(GradientType | string, optional)min(number, optional)max(number, optional)prop(string, optional) — {AtomSpec} property to use for gradient calculation. E.g., 'b' for temperature factors of a PDB.mid(number, optional) — mid point value for gradient (for rwb)colors(Array.<ColorSpec>, optional) — Custom colors for gradient (for CustomLinear)map(Record.<string, unknown>, optional) — map of a certain AtomSpec property to a color of the form{'prop': 'elem', map:elementColors.greenCarbon}Allows the user to provide a mapping of elements to colors to the colorscheme. This can be done with any properties, and not just 'elem'.
Type
string | object
- See: