Color coding

This modifier assigns colors to particles, bonds, vector glyphs, voxels or surfaces according to a selected input property. It thus provides a simple way of visualizing local property values by means of a coloring scheme.

The Operate on field selects the kind of elements the modifier should assign the colors to:

Operate onDescription

Colors particles according to a local property.


Colors bonds according to a local bond property.

Particle vectors

Colors vector glyphs by setting the Vector Color property of the associated particles.

Voxel grids

Colors the cells of a voxel grid according to a local property.

Mesh faces

Colors the facets of a surface mesh according to a local property.

Mesh vertices

Colors the vertices of a surface mesh according to a local property.

The color getting assigned to an element (e.g. a particle) is determined as follows by the modifier: First, the value of the selected input property of the element is linearly mapped (and clamped) to the unit interval [0,1] according to the Start value and End value parameters of the modifier. This normalized value is then mapped to an RGB color based on the selected color gradient type.

The Adjust range function resets the Start value and End value parameters to the minimum and maximum value of the selected input property, respectively. This ensures that no clamping of value occurs for the current simulation frame. The Adjust range (all frames) button does the same but will take into account all frames of the loaded animation sequence when determining the range of property values. The Reverse range button swaps the Start value and End value parameters to effectively reverse the color scale.

Custom color maps

The modifier offers a set of predefined color maps that you can choose from. If you would like to define your own type of color map instead, select Load custom color map... from the gradient list box. The program will ask you to pick an image file containing the custom color gradient. You can prepare an appropriate image using any image editing program. OVITO will use the colors along one row of pixels of the imported image to generate the user-defined color map. Here are two examples of color map images:

Color legend

You can let OVITO paint the color map as a legend for the color coding into rendered images by adding a Color legend layer to the active viewport.


Operate on

Selects the kind of data elements to be colored by the modifier.


The input particle property or bond property whose values should be used for coloring.

Color gradient

Selects the color gradient for mapping scalar values to colors.

Start & end value

Controls the value range for the linear mapping of input values to the [0,1] interval.

Color only selected elements

This option restricts the assignment of colors to currently selected particles or bonds. The colors of unselected particles or bonds will remain unchanged.

Keep selection

OVITO highlights selected particles in red in the interactive viewports. Since this would mask the actual colors assigned by this modifier, the modifier clears the current selection by default. This option retains the current selection so that it remains available to subsequent modifiers in the data pipeline.