Color
Set and manipulate the colors of atoms
Color Atomic Number
Choose the color for an individual atomic_number. Useful for joining with fields and selecting individual elements for coloring
Inputs
| Name | Type | Description |
|---|---|---|
| atomic_number | Int |
The atomic_number of to use the selected color for |
| Color | Color |
The color to use for the specified atomic_number |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
The generated color based on the node inputs |
API Reference: nodes.geometry.ColorAtomicNumber
Color Attribute Map
Map a value to interpolate between two colors, optionally using an intermediate color. User can specify the Attribute Name that is used for the inerpolation, specifying the start and end values of the interpolation
Inputs
| Name | Type | Description |
|---|---|---|
| Color Space | Menu |
|
| Name | String |
Name of the attribute to map colors to |
| Min | Float |
Value for the attribute to be the minimum color |
| Max | Float |
Value for the attribute to be the maxium color |
| Intermediate | Bool |
Wheter to interpolate through the ‘Mid’ color. |
| A | Color |
Color mapped to the minimum value of the attribute |
| Intermediate | Color |
Color mapped to the middle value of the attribute |
| B | Color |
Color mapped to the maximum value of the attribute |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
The mapped color value based on the attribute. |
API Reference: nodes.geometry.ColorAttributeMap
Color Attribute Random
Generate a random color, based on the given attribute. Control the lightness and saturation of the color with the inputs.
Inputs
| Name | Type | Description |
|---|---|---|
| Name | String |
Attribute to base the random color generation on |
| Colorspace | Menu |
|
| Color Seed | Int |
Seed value for the random generation of the colors |
| HSL Saturation | Float |
Saturlation level for the random color |
| HSL Lightness | Float |
Lightness value for the generated random color |
| OKLab Luminance | Float |
|
| OKLab Chroma | Float |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
The randomly generated color based on the input attribute |
API Reference: nodes.geometry.ColorAttributeRandom
Color CSS
A named CSS colour, the colour names MolViewSpec and ChimeraX use. The colours are the same as mol.set_color("salmon") from Python, where a name without a prefix is a CSS name.
Inputs
| Name | Type | Description |
|---|---|---|
| Color | Menu |
CSS colour name, as used by MolViewSpec and ChimeraX |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
The named colour, in linear RGB |
API Reference: nodes.geometry.ColorCSS
Color Common
For convenience, choose colors for the common 6 elements found protein structures
Inputs
| Name | Type | Description |
|---|---|---|
| Hydrogen | Color |
Color to set for the element Hydrogen |
| Carbon | Color |
Color to set for the element Carbon |
| Nitrogen | Color |
Color to set for the element Nitrogen |
| Oxygen | Color |
Color to set for the element Oxygen |
| Phosphorous | Color |
Color to set for the element Phosphorous |
| Sulfur | Color |
Color to set for the element Sulfur |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
The output colors for the common elements |
API Reference: nodes.geometry.ColorCommon
Color Element
Choose colors for the individual elements of the periodic table. The first 80 elements are listed, grouped into panels in chunks of 20 elements per panel for better organisation.
Inputs
| Name | Type | Description |
|---|---|---|
| H | Color |
Set the color for the element H |
| He | Color |
Set the color for the element He |
| Li | Color |
Set the color for the element Li |
| Be | Color |
Set the color for the element Be |
| B | Color |
Set the color for the element B |
| C | Color |
Set the color for the element C |
| N | Color |
Set the color for the element N |
| O | Color |
Set the color for the element O |
| F | Color |
Set the color for the element F |
| Ne | Color |
Set the color for the element Ne |
| Na | Color |
Set the color for the element Na |
| Mg | Color |
Set the color for the element Mg |
| Al | Color |
Set the color for the element Al |
| Si | Color |
Set the color for the element Si |
| P | Color |
Set the color for the element P |
| S | Color |
Set the color for the element S |
| Cl | Color |
Set the color for the element Cl |
| Ar | Color |
Set the color for the element Ar |
| K | Color |
Set the color for the element K |
| Ca | Color |
Set the color for the element Ca |
| Sc | Color |
Set the color for the element Sc |
| Ti | Color |
Set the color for the element Ti |
| V | Color |
Set the color for the element V |
| Cr | Color |
Set the color for the element Cr |
| Mn | Color |
Set the color for the element Mn |
| Fe | Color |
Set the color for the element Fe |
| Co | Color |
Set the color for the element Co |
| Ni | Color |
Set the color for the element Ni |
| Cu | Color |
Set the color for the element Cu |
| Zn | Color |
Set the color for the element Zn |
| Ga | Color |
Set the color for the element Ga |
| Ge | Color |
Set the color for the element Ge |
| As | Color |
Set the color for the element As |
| Se | Color |
Set the color for the element Se |
| Br | Color |
Set the color for the element Br |
| Kr | Color |
Set the color for the element Kr |
| Rb | Color |
Set the color for the element Rb |
| Sr | Color |
Set the color for the element Sr |
| Y | Color |
Set the color for the element Y |
| Zr | Color |
Set the color for the element Zr |
| Nb | Color |
Set the color for the element Nb |
| Mo | Color |
Set the color for the element Mo |
| Tc | Color |
Set the color for the element Tc |
| Ru | Color |
Set the color for the element Ru |
| Rh | Color |
Set the color for the element Rh |
| Pd | Color |
Set the color for the element Pd |
| Ag | Color |
Set the color for the element Ag |
| Cd | Color |
Set the color for the element Cd |
| In | Color |
Set the color for the element In |
| Sn | Color |
Set the color for the element Sn |
| Sb | Color |
Set the color for the element Sb |
| Te | Color |
Set the color for the element Te |
| I | Color |
Set the color for the element I |
| Xe | Color |
Set the color for the element Xe |
| Cs | Color |
Set the color for the element Cs |
| Ba | Color |
Set the color for the element Ba |
| La | Color |
Set the color for the element La |
| Ce | Color |
Set the color for the element Ce |
| Pr | Color |
Set the color for the element Pr |
| Nd | Color |
Set the color for the element Nd |
| Pm | Color |
Set the color for the element Pm |
| Sm | Color |
Set the color for the element Sm |
| Eu | Color |
Set the color for the element Eu |
| Gd | Color |
Set the color for the element Gd |
| Tb | Color |
Set the color for the element Tb |
| Dy | Color |
Set the color for the element Dy |
| Ho | Color |
Set the color for the element Ho |
| Er | Color |
Set the color for the element Er |
| Tm | Color |
Set the color for the element Tm |
| Yb | Color |
Set the color for the element Yb |
| Lu | Color |
Set the color for the element Lu |
| Hf | Color |
Set the color for the element Hf |
| Ta | Color |
Set the color for the element Ta |
| W | Color |
Set the color for the element W |
| Re | Color |
Set the color for the element Re |
| Os | Color |
Set the color for the element Os |
| Ir | Color |
Set the color for the element Ir |
| Pt | Color |
Set the color for the element Pt |
| Au | Color |
Set the color for the element Au |
| Hg | Color |
Set the color for the element Hg |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
The selected colors based on the atomic_number |
API Reference: nodes.geometry.ColorElement
Color Goodsell
Darken the color of non-carbon atoms, a similar strategy to the style developed by David Goodsell
Inputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
Color to apply ‘Goodsell’ style colors to |
| Factor | Float |
Amount to apply the ‘Goodsell Style’ coloring to |
| Invert | Bool |
Whether to invert the darkening of the colors |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
The generated color based on the node inputs |
API Reference: nodes.geometry.ColorGoodsell
Color matplotlib
Colour a Value from 0 to 1 with one of matplotlib’s colormaps. Pick the group with Category, then the colormap from that group’s menu; the other groups’ menus are ignored. Reverse runs the colormap from 1 to 0, like matplotlib’s _r maps. Values outside 0..1 are clamped. Pair with Field Remap or a Map Range node to colour an attribute such as b_factor over its own range. Each colormap is a Color Ramp of at most 32 stops fitted to matplotlib’s colours, within about 1/255 for most maps; a few busy maps such as gist_ncar, nipy_spectral and jet lose some detail, noted in the frame next to each ramp inside the node.
Inputs
| Name | Type | Description |
|---|---|---|
| Value | Float |
Position along the colormap, 0 to 1. Values outside are clamped |
| Reverse | Bool |
Run the colormap from 1 to 0, like matplotlib’s _r maps |
| Category | Menu |
Group of colormaps, as in matplotlib’s colormap reference |
| Uniform | Menu |
Perceptually uniform sequential colormap, used when Category is Uniform |
| Sequential | Menu |
Sequential colormap, used when Category is Sequential |
| Sequential 2 | Menu |
Sequential (2) colormap, used when Category is Sequential 2 |
| Diverging | Menu |
Diverging colormap, used when Category is Diverging |
| Cyclic | Menu |
Cyclic colormap, used when Category is Cyclic |
| Qualitative | Menu |
Qualitative colormap, used when Category is Qualitative |
| Miscellaneous | Menu |
Miscellaneous colormap, used when Category is Miscellaneous |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
Colour of the selected colormap at Value |
API Reference: nodes.geometry.ColorMatplotlib
Color Mix Intermediate
Mix between two colors, potentially via an intermediate color. Use either linear or OKLab color spaces
Inputs
| Name | Type | Description |
|---|---|---|
| Factor | Float |
|
| Menu | Menu |
|
| Intermediate | Bool |
|
| A | Color |
|
| Intermediate | Color |
|
| B | Color |
Outputs
| Name | Type | Description |
|---|---|---|
| Output | Color |
API Reference: nodes.geometry.ColorMixIntermediate
Color OKLab Mix
Mix two colors together using the OKLab color space. The first color is the base color, and the second color is the color to mix in. The mix is done in the OKLab color space, and then converted back to linear RGB color space.
Inputs
| Name | Type | Description |
|---|---|---|
| Factor | Float |
|
| A | Color |
|
| B | Color |
Outputs
| Name | Type | Description |
|---|---|---|
| Result | Color |
API Reference: nodes.geometry.ColorOKLabMix
Color OKLab Offset
Offset a color’s luminance or hue in the OKLab color space. The offset is applied to the luminance or hue of the color.
Inputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
|
| Colorspace | Menu |
|
| Luminance | Float |
|
| Saturation | Float |
|
| Lightness | Float |
|
| Hue | Float |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
API Reference: nodes.geometry.ColorOKLabOffset
Color pLDDT
Uses the b_factor attribute to assign the typical AlphaFold pLDDT color palette. Node is automatically used when fetching directly from the AlphaFold database
Inputs
| Name | Type | Description |
|---|---|---|
| <50 | Color |
Color for pLDTT < 50 |
| <70 | Color |
Color for 50 < pLDTT < 70 |
| <90 | Color |
Color for 70 < pLDTT < 90 |
| >90 | Color |
Color for 90 < pLDTT |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
Assigned color based on the pLDTT score |
API Reference: nodes.geometry.ColorPLDDT
Color PyMOL
A named colour from PyMOL, with the value PyMOL gives it, so a scene can match a figure or session made in PyMOL. Pick the group with Category, then the colour from that group’s menu; the groups follow PyMOL’s own Color menu, with PyMOL’s element colours as the Elements group. The colours are the same as mol.set_color("pymol:salmon") from Python. PyMOL’s values for some names differ from the CSS colours of the same name, such as green and orange; Color CSS has those.
Inputs
| Name | Type | Description |
|---|---|---|
| Category | Menu |
Group of colours, as in PyMOL’s Color menu |
| Reds | Menu |
PyMOL colour, used when Category is Reds |
| Greens | Menu |
PyMOL colour, used when Category is Greens |
| Blues | Menu |
PyMOL colour, used when Category is Blues |
| Yellows | Menu |
PyMOL colour, used when Category is Yellows |
| Magentas | Menu |
PyMOL colour, used when Category is Magentas |
| Cyans | Menu |
PyMOL colour, used when Category is Cyans |
| Oranges | Menu |
PyMOL colour, used when Category is Oranges |
| Tints | Menu |
PyMOL colour, used when Category is Tints |
| Grays | Menu |
PyMOL colour, used when Category is Grays |
| Elements | Menu |
PyMOL colour, used when Category is Elements |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
The named colour, in linear RGB |
API Reference: nodes.geometry.ColorPyMOL
Color Rainbow
Output a rainbow color spectrum along the structure. The rainbow can be generated along each chain in the structure, or along the entire structure. You can offset the strat of the rainbow and chain the color & satuation of the generated colors
Inputs
| Name | Type | Description |
|---|---|---|
| Factor | Menu |
|
| Color Space | Menu |
|
| Offset | Float |
Offset the starting hue of the rainbow colors. HSV is 0-1 for the entire rainbow, OKLab is -Pi to Pi for the rainbow. |
| HSL Saturation | Float |
The Saturation value of the rainbow colors |
| HSL Value | Float |
The Value value of the resulting rainbow colors |
| OKLab Luminance | Float |
|
| OKLab Chroma | Float |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
The generated color |
API Reference: nodes.geometry.ColorRainbow
Color Res Name
Choose colors for the individual amino acid and nucleic acid residues
Inputs
| Name | Type | Description |
|---|---|---|
| ALA | Color |
Set the color for the residue ALA |
| ARG | Color |
Set the color for the residue ARG |
| ASN | Color |
Set the color for the residue ASN |
| ASP | Color |
Set the color for the residue ASP |
| CYS | Color |
Set the color for the residue CYS |
| GLU | Color |
Set the color for the residue GLU |
| GLN | Color |
Set the color for the residue GLN |
| GLY | Color |
Set the color for the residue GLY |
| HIS | Color |
Set the color for the residue HIS |
| ILE | Color |
Set the color for the residue ILE |
| LEU | Color |
Set the color for the residue LEU |
| LYS | Color |
Set the color for the residue LYS |
| MET | Color |
Set the color for the residue MET |
| PHE | Color |
Set the color for the residue PHE |
| PRO | Color |
Set the color for the residue PRO |
| SER | Color |
Set the color for the residue SER |
| THR | Color |
Set the color for the residue THR |
| TRP | Color |
Set the color for the residue TRP |
| TYR | Color |
Set the color for the residue TYR |
| VAL | Color |
Set the color for the residue VAL |
| A | Color |
Set the color for the residue A |
| C | Color |
Set the color for the residue C |
| G | Color |
Set the color for the residue G |
| T | Color |
Set the color for the residue T |
| rA | Color |
Set the color for the residue rA |
| rC | Color |
Set the color for the residue rC |
| rG | Color |
Set the color for the residue rG |
| rU | Color |
Set the color for the residue rU |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
API Reference: nodes.geometry.ColorResName
Color Residue Class
Color amino acids by residue class, with the same classes as Select Residue Class. Anything that is not an amino acid keeps its current color.
Inputs
| Name | Type | Description |
|---|---|---|
| Positively Charged | Color |
Color for ARG, HIS and LYS |
| Negatively Charged | Color |
Color for ASP and GLU |
| Polar Uncharged | Color |
Color for SER, THR, ASN and GLN |
| Special Case | Color |
Color for CYS, SEC, GLY and PRO |
| Hydrophobic | Color |
Color for ALA, VAL, ILE, LEU, MET, PHE, TYR and TRP |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
Residue class colors, and the current color for anything that is not an amino acid |
API Reference: nodes.geometry.ColorResidueClass
Color Sample Grid
Color each point by the value of a float grid at its position, such as an electrostatic potential from APBS on a Style Surface. Pick the volume object with Object and the grid with Grid Name; densities loaded with Molecular Nodes name their grid density. Values from Min to Max blend linearly from A through Intermediate to B, and values outside the range take the end colors. The default -5 to 5 suits an APBS potential in kT/e. Value outputs the sampled value, trilinearly interpolated, and is zero outside the grid. Densities are stored as 32-bit float grids, as Blender’s grid nodes return zero for 64-bit (DOUBLE) grids. Place it in a Set Color after a style to color the style’s own points (each surface vertex), or before a style to color the atoms by the value at their centres. Pick the density itself in Object, styled or not: density styles turn the volume into a mesh, but Import Volume keeps the grid in the bundle of its output as MN Grid <Name> and the styles pass it on, so the node samples the grid named Grid Name there, otherwise the grid of that name in the object’s own volume. The grid is sampled in world space, so moving either object moves the molecule through the grid.
Inputs
| Name | Type | Description |
|---|---|---|
| Object | Object |
Object holding the grid to sample: a density loaded with Molecular Nodes, styled or not, or any volume object |
| Grid Name | String |
Name of the grid to sample: the Name of the density’s Import Volume node (density by default), or a grid of the object’s own volume |
| Min | Float |
Grid value mapped to color A, in the grid’s own units (kT/e for an APBS potential) |
| Max | Float |
Grid value mapped to color B, in the grid’s own units |
| A | Color |
Color for values at or below Min |
| Intermediate | Color |
Color for the value halfway between Min and Max. Colors blend linearly from A to Intermediate to B |
| B | Color |
Color for values at or above Max |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
Color mapped from the grid value at each point |
| Value | Float |
Grid value at each point, trilinearly interpolated. Zero outside the grid |
API Reference: nodes.geometry.ColorSampleGrid
Color Secondary Structure
Inputs
| Name | Type | Description |
|---|---|---|
| Helix | Color |
Color to set for alpha helices |
| Sheet | Color |
Color to set for beta-sheets |
| Loop | Color |
Color to set for loops in the structure |
| Other | Color |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
The colors based on secondary structure |
API Reference: nodes.geometry.ColorSecondaryStructure
Color to LCh
Inputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
Outputs
| Name | Type | Description |
|---|---|---|
| L | Float |
|
| C | Float |
|
| h | Float |
API Reference: nodes.geometry.ColorToLCh
Color VMD
A named colour from VMD, with the value VMD gives it by default, in VMD’s colour ID order (blue is ID 0). The colours are the same as mol.set_color("vmd:mauve") from Python. VMD’s values for some names differ from the CSS colours of the same name, such as gray and green; Color CSS has those.
Inputs
| Name | Type | Description |
|---|---|---|
| Color | Menu |
VMD colour, in colour ID order (0 to 32) |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
The named colour, in linear RGB |
API Reference: nodes.geometry.ColorVMD
LCh to Color
Inputs
| Name | Type | Description |
|---|---|---|
| L | Float |
|
| C | Float |
|
| h | Float |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
API Reference: nodes.geometry.LChToColor
Random Color
Inputs
| Name | Type | Description |
|---|---|---|
| ID | Int |
|
| Color Seed | Int |
Seed value for the random generation of the colors |
| Colorspace | Menu |
|
| HSL Saturation | Float |
Saturlation level for the random color |
| HSL Lightness | Float |
Lightness value for the generated random color |
| OKLab Luminance | Float |
|
| OKLab Chroma | Float |
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
API Reference: nodes.geometry.RandomColor
Set Color
Set the Color attribute on the point domain, based on the input Color field. The Selection field limits the setting of the color to the input Selection, with the unselected points keeping their current Color attribute
Inputs
| Name | Type | Description |
|---|---|---|
| Atoms | Geometry |
Atomic geometry that contains vertices and edges |
| Selection | Bool |
Selection of atoms to apply this node to |
| Color | Color |
Color to apply to the selected atoms |
Outputs
| Name | Type | Description |
|---|---|---|
| Atoms | Geometry |
Atomic geometry with an updated Color attribute |
API Reference: nodes.geometry.SetColor
MN Color
Outputs
| Name | Type | Description |
|---|---|---|
| Color | Color |
|
| Alpha | Float |
API Reference: nodes.shader.MNColor