WOLFRAM SYSTEM MODELER

Colors

Library of functions operating on color

Package Contents

ColorMaps

Library of functions returning color maps

colorMapToSvg

Save a color map on file in svg (scalable vector graphics) format

scalarToColor

Map a scalar to a color using a color map

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

This package contains functions to operate on colors. Note, a color is represented as a Real array with 3 elements where the elements are the red, green, blue values of the RGB color model. Every element must be in the range 0 … 255. The type of a color is Real and not Integer in order that a color can be used with less problems in a model, since in a model an Integer type could only be used in a when-clause. Typical declaration of a color value:

Real color[3](each min=0, each max=255);

This definition is also available as type Modelica.Mechanics.MultiBody.Types.RealColor.

Wolfram Language

In[1]:=
SystemModel["Modelica.Mechanics.MultiBody.Visualizers.Colors"]
Out[1]:=