Visual Computing in Life Science: Color for Visualization

Jeheonpark
5 min readAug 31, 2020

--

Image Source: Rogowitz et al.

These images show exactly the same data but they have different color spaces. The left top one is rainbow color space and it is used for reading exactly values and it is normal setting of many devices. The right top is isomorphic colormap and it is more visible in the bottom half than the rainbow color map and we can distinguish the specific region that reflects the specific intensity in the rainbow color map. Therefore, we need to choose the color map carefully.

Real Case

Real visualization mistakes. Blood vessel visualization, Image Source: Lundström et al.

The left one’s colormap is wrongly picked and doctors thought the patient needs a catheter to expand the blood vessel and they performed surgery and found out the surgery actually does not need to be done. They rebuilt the picture with different color map and they got the right picture. So, picking a proper color map in life science can produce significant results.

Scales of Measurement

Before picking the color map, we need to think about our data is which type is. According to Stanley Smith Stevens, there are 4 types, Nominal, Ordinal, Interval, and Ratio.

  1. Nominal: It does not have order and just class, ex. types of birds.
  2. Ordinal: It has small and big concepts but it does not have meaning on (+, -) operators. ex. T-shirt size
  3. Interval: It has small and big concepts and it also has meaning with (+, -) operators. ex. temperature.
  4. Ratio: It has all properties of interval type and it has meaning with ratio. ex. height (we can say the thing is twice taller than other.)

Nominal Data Visualization

Example by Gordon Kindlmann, it shows data type and its size

In my other post, I mentioned people cannot distinguish many colors at the same time and its maximum is around 9 basic colors: Magenta, Blue, Blue-green, Green, Yellow-green, Yellow, Orange, Reddish orange, Red. This is the recommendation of colors.

Other recommendations

This is the six opponent colors and we can think this is a natural choice. In deuteranomaly, the ability to distinguish between red and green is preserved if color contrast and luminance are sufficient.

Ordinal Data

Represent the changes in ordinal data.

It is not that hard to choose the color map in this case. What we need to consider is the color map needs to clearly suggest ordering.

Interval Data

The Interval scale should be symmetric to the addition of a constant.

The rainbow color map is not a good choice to visualize interval data. In the right picture above, we can see it is hard to distinguish.

Ratio Data

Meaningful zero

Caveat

Grayscale for color-coding:

The legends are detailed but it is hard to distinguish.

The picture above is hard to find the details and the differences between the legend. Why does it happen?

  1. Our perception of brightness actually does not follow the linear relationship with luminous and it follows the power law.
  2. Due to contrast effects, large read off errors(20% of range) occurs when using grayscale to encode continuous quantities. It happens because our eyes exaggerate the contrast.

Rainbow Color Map

The default colormap in many visualization systems, eye-catching, improves read off accuracy, but it has many drawbacks:

  1. No intuitive ordering
Reference: Borland/Taylor, Rainbow Color Map (Still) Considered Harmful, CG&A 2007

You can say rainbow has order but it is not intuitively perceived by humans. Therefore, it is not a good idea to choose a rainbow color map to visualize ordered values.

2. Can reduce sensitivity

Reference: Borland/Taylor, Rainbow Color Map (Still) Considered Harmful, CG&A 2007

Luminance has a high contrast sensitivity but the contrast sensitivity between colors is poor.

3. Artifactual gradients:

In the color map, the change of color looks like the sudden transition of values because the rainbow color map is not a unity color map for human perception. It can look like a slow or quick transition of value.

4. Relies on red-green vision

You have to consider the colorblind because many people have it.

Guidelines for Color Map Design

General suggestion:

  1. Combine changes in hue with monotonically increasing luminance
  2. Avoid combining red and green
  3. Enforce perceptual uniformity
  4. Supports reading off values more precisely
  5. Still maintains an intuitive impression of high and low values.

But, in most of the case, you can use well pre-designed colormaps.

How do we choose color maps?

Right one pick the dark color map and the surface is not observable

The choice depends on whether to highlight neutral value, use in 2D or on the surface(in this case, we need to avoid dark color because we are going to use shading on the surface), and aesthetics / personal preference. We can choose these color maps on ParaView, MatPlotlib, or other libraries.

Practical tips

If you want to consider the color impairment you can check:

http://www.color-blindness.com/coblis-color-blindness-simulator/

http://www.daltonize.org/

Check the color maps for your own purpose:

colorbrewer2.org

Saturation

Google maps

If you visualize small shape or fine details then it needs to be strong to be distinguishable and you can check the google map they use the soft colors on backgrounds. Therefore you should use a strong color on details and soft colors on backgrounds. If the data is text, you should use enough luminance contrast or add a strong border(or Cornsweet edge).

Cornsweet edge

The process of sharpening for Cornsweet effect

Conrsweet edges can increase apparent contrast in an image. It does not affect the actual luminance but it makes the overshoot on both sides and it is useful because our eyes are sensitive towards the contrast.

This post is published on 8/31/2020

--

--

Jeheonpark
Jeheonpark

Written by Jeheonpark

Jeheon Park, Software Engineer at Kakao in South Korea

No responses yet