Color maps: better CFD visualization in Simcenter STAR-CCM+
On this page
In short
What makes two colors a good match, and why the familiar color wheel is not enough for data. Which map type fits which quantity, with marine examples. A STAR-CCM+ macro that turns company identity colors into a complete, perceptually correct set of color maps.
A color map is part of your measurement, not decoration. It decides which gradients a viewer notices, where they think the flow separates, and whether a colleague with red-green color blindness sees anything at all. Yet many CFD images still leave the office in a default blue-to-red rainbow.
This post covers three things:
- Color basics. What makes two colors a good match, and why the familiar color wheel is not enough for data.
- Choosing a color scale for CFD. Which map type fits which quantity, with marine examples: free surface, waves, cavitation, exhaust gas and propeller wake.
- A STAR-CCM+ macro. It turns company identity colors into a complete, perceptually correct set of color maps.
Part 1: What makes colors a good match
First things first. Here are some important terms when we describe colors:
- Lightness: how bright it looks.
- Chroma: how colorful it is, from grey to vivid.
- Hue: which color family it belongs to: red, orange, teal, blue and so on.
Two colors work well in a plot when their hues are distinct, but their lightness is similar. A good color scale also changes lightness steadily across its range. The traditional color wheel addresses hue, but not lightness.
However, there is a problem with the color spaces we typically use (RGB and HSV) when picking colors. They do not measure the color as the eye sees them. For example, pure yellow and pure blue both have 100 % “value” in HSV. But in the perceptual Oklab space yellow has a lightness of 0.97 and blue only 0.45. Hence, if you put both in one color map, the yellow band jumps out to the eye, whether the data do anything there or not.
The typical HSV color gradient varies Hue but keeps the Saturation and Value. The Oklab color gradient on the other hand varies the Hue with constant lightness and chroma. The difference is an uneven gradient of the HSV color gradient, that can misguide the perception of the observer of CFD results.
Perceptual color spaces such as CIELAB, CAM02-UCS and Oklab fix this. Equal distances in them correspond roughly to equal perceived differences. Oklab was published in December 2020 by the Swedish engineer Björn Ottosson and is now part of the CSS color standard for the web. The macro in Part 3 uses Oklab for all its calculations.
Complementary colors, and what the color wheel misses
Newton´s book, Opticks, presented the circle of colors to illustrate their relation between them. While Newton only showed the spectral hues, today´s color wheel is often used determine complementary colors, which sit opposite each other and gives the strongest hue contrast. That is a good start for a diverging color map for simulation results, where one hue stands for negative and the other for positive values. However, to handle data, the pair must also pass three further tests:
- Equal lightness. Otherwise, one side of zero looks more important than the other.
- Enough chroma on both sides, so the two ends are clearly colored and not greyish.
- Distinguishable for color-blind viewers. About 8 % of men and 0.5 % of women have a color-vision deficiency, most often red-green (Crameri et al., 2020). In an engineering team of twenty, odds are that at least one person cannot tell your red from your green.
The compatibility with color-vision deficiency can be simulated according to a model of Machado et al. (2009). Below we have five example color pairs through these tests. Separation is the color distance in Oklab, which is better with a higher value.
Red and green look like a perfect complementary pair on the wheel. But for a red-green color-blind viewer, their separation drops from 0.36 to 0.06 and both turn olive-brown according to Machado et al.´s model. Blue against orange (or teal against coral) runs along the yellow-blue axis, which red-green color-blind viewers still see. That is why it is the safest backbone for diverging maps.
Part 2: Color scale for CFD results
Why the rainbow fails in CFD
The rainbow (“jet”, “blue-red”) changes hue but not lightness. Its brightest band, yellow, sits in the middle of the range rather than at an end. The uneven gradients, as discussed above add artificial boundaries in some parts of the range and hide small-scale variation in others.
In the praxis example of the backward facing step simulation, we can observe a misconception when the default color map draws our attention to two color bands (light blue and yellow) in the gradient. Those artificial boundaries look like physics and indicate a high velocity gradient.
While the Oklab color scale represents the actually even gradient of the flow velocity, clarified also by the contour plot in the figure below. In a CFD picture. A sharp cyan-to-yellow edge reads as a shear layer, a separation line or a shock, even where the field is smooth
Another example is the residence time in an internal pipe flow simulation. Here the color scale hides small-scale variation in the center of the pipe while our attention is drawn to the near wall and outlet region. At the same time wisely chosen color map reviles more details about the flow field.
Step 1: Match the map type to the quantity
The accurate representation of data suggested by Crameri et al., 2020 provides distinctive guidelines for choosing the correct color map. It is simplified in the figure below. Work your way down the questions in Figure 5. The first “yes” decides the map type, so the order matters: a periodic angle is never treated as a magnitude, and a cavitation margin is treated as a threshold before it is treated as a signed value.
Step 2: Settings that matter as much as the colors
- Fix the range. Auto-ranging changes the colors from frame to frame in an animation and from case to case in a design study. Fix it once per quantity and reuse it across the whole report.
- Keep diverging maps symmetric. If the range is −2 … 5, the neutral center no longer sits at zero and viewers read a bias that isn’t there.
- Design for the background. On a light page, let low values fade into the background so the free stream disappears and the wake stands out. In VR or photorealistic scenes, use a dark-centered variant instead.
- Use opacity on purpose. In resampled volume rendering, the opacity ramp of the color map decides what you see. Make air, clean air or liquid without vapor fully transparent, and the hull, propeller or superstructure stays visible.
- Use a logarithmic mapping for quantities that span decades, such as y+ or turbulent viscosity ratio.
- One quantity, one color map, one range. Across a report, the same colors must always mean the same values.
In short: Choose the color map type from the physics of the quantity, then fix its range and adapt it to the background. Choosing by taste comes last.
Marine examples
We can implement the above guidelines for an example color map set, dedicated to marine applications in the vlp set (Volupe’s own set of STAR-CCM+ color maps). The common principle: a color that means something physical (water is blue, vapor is white, smoke is grey, hot is bright).
| Application | Color map | Comment |
| Free surface | vof-water | Air matches the light background. A colored band marks the 0.5 contour, so a smeared interface is visible at once. |
| Free surface, overlay | vof-water-clear-air | Same colors, but air is fully transparent, so the hull above the waterline stays visible. |
| Wave pattern | wave-elevation | Diverging: blue troughs, amber crests, near white for calm water. Using a range symmetric about the flat-water level. |
| Cavitation on blades | cavitation-surface | Vapor fraction: 0 is metal grey, so non-cavitating areas read as geometry; sheet and tip cavitation show in coral to crimson. |
| Cavitation risk | cavitation-margin | Cp + σ with a hard edge at 0: everything below vapor pressure is red, the safe margin is muted teal. |
| Cavitation in volume renders | cavitation-volume | White-cyan vapor that fades to invisible at zero, like cavitation-tunnel photographs. |
| Exhaust gas | exhaust-smoke, exhaust-heat | Smoke that darkens with concentration and is transparent in clean air; temperature on a black-body scale. |
| Propeller wake | wake-banded | Ten bands of 0.1 u/U give iso-wake contours without a separate contour displayer. |
The figures below show four of these maps in real simulations: the KCS container ship, and the PPTC propeller in open water. Beside each image are the lightness profile of its color bar and simulations for the three common types of color blindness.
Part 3: Brand Colormaps
Allowing you to utilize the learned aspects about colors and to easily embed it into your workflow, we prepared a single STAR-CCM+ macro “BrandColormaps.java”. It builds five color maps according to above discussions, based on e.g. your two company colors. It also writes a shareable .colormap file.

| Map | How the two colors are used |
| <prefix>-sequential | light → color 1 → dark |
| <prefix>-banded | the sequential map in 10 flat steps |
| <prefix>-diverging | color 1 ← light center → color 2 |
| <prefix>-cyclic | light → color 1 → dark → color 2 → light |
| <prefix>-threshold | color 2 below the center value, a hard edge, then light → muted color 1 above |
Every map follows the fixed lightness profile in Oklab. The lightness profiles are shaped according to the data types: linear for sequential and banded, a symmetric V for diverging and cyclic. etc. Each map needs conversion to linear RGB values, such that Simcenter STAR-CCM+ can read them. This conversion uses the code provided by https://bottosson.github.io/posts/oklab/#converting-from-linear-srgb-to-oklab
Below figure shows the five maps for four color pairs. The macro uses the two colors as given. If they are hard to tell apart, as with red and green for color-blind viewers, it prints a warning but still builds the maps.
At its core, the macro uses a few lines of the STAR-CCM+ Java API. A color map is a list of stops (position, r, g, b) plus an opacity list (position, alpha):
LookupTableManager ltm = sim.get(LookupTableManager.class); UserLookupTable t = ltm.createLookupTable(); t.setColorMap(new ColorMap(new DoubleVector(colorValues), new DoubleVector(alphaValues), 0)); t.setPresentationName("acme-diverging");
Conclusion
Here we have outlined some of the basics of color theory plus some guidelines for the creation of CFD color maps. If you are interested in more details and advanced post-processing for CFD simulation results, please check out our dedicated course https://volupe.com/events/advanced-post-processing-simcenter-star-ccm-on-site-training/ and contact us at support@volupe.com
Download
- vlp-colormaps-starccm.zip (plus an import macro)
- BrandColormaps.zip
Sources
- Borland, D. and Taylor, R. M. (2007). Rainbow Color Map (Still) Considered Harmful. IEEE Computer Graphics and Applications 27(2), 14–17.
- Crameri, F., Shephard, G. E. and Heron, P. J. (2020). The misuse of color in science communication. Nature Communications 11, 5444.
- Machado, G. M., Oliveira, M. M. and Fernandes, L. A. F. (2009). A physiologically-based model for simulation of color vision deficiency. IEEE Transactions on Visualization and Computer Graphics 15(6), 1291–1298.
- Ottosson, B. (2020). A perceptual color space for image processing (Oklab).
- Ware, C., Stone, M. and Szafir, D. A. (2023). Rainbow Colormaps Are Not All Bad. IEEE Computer Graphics and Applications 43(3).











