If you want to represent a one-dimensional gradient where what is most important is "hot vs cold", i.e. the extremes, then you shouldn't be using a colormap (rainbow) in the first place, you should be using a direct gradient instead, whether grayscale or interpolated between two nearby colors (e.g. red/yellow).
Colormaps are for where highlighting local variation is important -- more important than indicating whether something is closer to one extreme or another. In the examples, this means being able to distinguish the patterns of the objects. In math plots, it means helping to see the shapes of curves. In weather maps, that means judging variation within your state, even while the map ranges from Alaska to Florida.
For this, it's most important to be able to maximize contrast in local differences but also have the perceptual rate of change be roughly comparable.
Rainbows maximize contrast using hue, because our eyes can simply distinguish so much more than with just brightness. Turbo makes the rate of change more constant than Jet. And Jet/Turbo most importantly double the resolution that Inferno has, going from dark-bright-dark rather than just dark-bright.
EDIT the "hue ramps" style of colormap is also quite interesting, although i can't find an example, and can't be bothered to create one:
I find Inferno/Viridis perfectly good for representing one-dimensional gradients. They're easier to glance at then a single hue and show contrast between min/max better. Greyscale and single hue can also make it hard to notice small variations.
I can see Turbo being useful for heatmaps where you want to notice differences rather than variation between hot and cold.
In general though I would say that choice of colormap is subjective and there isn't a general rule for when to use which colormap. I usually plot the same image in multiple colormaps and choose the one which helps me the most for that usecase. Another person may choose differently.
That’s basically the objection this mapping is aiming to address.
Where jet and other non-uniform maps are useful is in highlighting small fluctuations in the value. It's less about z1 > z2 and more about z1 != z2 across the image plane.
A similar problem happens with datashader in histogram normalisation mode. It's great for highlighting small variations in the underlying density and revealing detail that you'd otherwise never see, but worthless for trying to compare one density to another by eye.
Horses for courses.
Computers are already really good at dealing with large-scale details. The human eye can notice edge-case scenarios in a large dataset pretty rapidly. I'm sold on Turbo because it lets your eyes change scale on the fly. You can be looking at the large scale and rapidly focus in on particulars within a smaller band, and back out again, as needed.
I've tried inferno and viridis to visualize weather radar data, and... rainbow-like colormap simply works better. And this is true for most weather data like wind or temperature. With a uniform colormap, you wouldn't be able to see local variations, e.g. differences in temperature within the UK.
On this point I don't see Turbo is being a do it all colormap. In the depth comparison images I still see Inferno and Viridis being superior and personally have no confusion between which spheres line up with which rings. Turbo in fact confuses me on this by introducing the false 2D color gradient.
Where I see Turbo being useful, as others have pointed out, is for heatmaps. I personally find Inferno's low end contrast being problematic and usually resort to Spectral for picking out details. If you can live with the fact that the lightest part of the chair in the test image is rendered darkly in Turbo (compare with Inferno), then Turbo is great for purely picking out detail (and taking brightness with a pinch of salt).
In the end, it depends on your usecase. Use a linear colormap when appropriate and vice versa.
I'd love to see Turbo analyzed in the same fashion.
It looks like Turbo is just Jet, but plotted in CIECAM02-UCS (instead of Jet's HSV). It removes many disadvantages of Jet, while keeping Jet's advantage over Viridis/Inferno of making it easier to compare/contrast small differences.
The video and the blog post actually go over a lot of the same topics, like perceptual lightness and how Jet was found to lead to mistakes reading medical imaging.
I'm not sure what analysis you're looking for; the video's a good explanation of color theory, but its analysis of Viridis is mainly just "we plotted a line through CIECAM02-UCS color space and made it linear lightness". Turbo is the same, except the line is curvier and not linear lightness – and the blog post goes through the tradeoffs of that approach.
Unless they happen to be near the middle of the data range, at which point it becomes much harder to compare them. This makes an artificial (not from the data) visual artifact for the entire middle part of the data range.
Also visual contrast for data at one part of the data range is no longer remotely comparable to visual contrast for other parts of the data range. Finally, amount of perceived contrast is no longer proportional to differences in the data.
* * *
The specific comparisons done are misleading: they picked a test image with important low-contrast detail at one end of the data range and no important low-contrast detail near the middle of the data range, because they are promoting their color map which has very dramatic lightness contrast at the ends of the data range at the expense of almost no lightness contrast near the middle of the data range.
If you were expecting to be working with data like this frequently there are many other things you could do to improve contrast in the part of the data you are specifically interested in.
While it's true that Turbo/Jet have low lightness contrast in the middle range, it makes up for it with hue contrast.
While there are of course ways to improve contrast in specific parts of a data range, I like Turbo for having high contrast in general, to make it less necessary to "zoom in" on a specific range, and also to have even higher contrast after zooming in.
Yes that cherry-picked image. Their original data is some kind of (log-scaled?) distance map, where half (?) of the image is in the bottom 20% of the data range.
They put a bunch of apparently important data between values of like 0.00 and 0.05, but don’t have any substantial amount of important data between 0.45 and 0.55.
Their color scheme has very strong lightness contrast in the 0.0 to 0.05 range, and almost no lightness contrast in the 0.45 to 0.55 range.
If they had instead put a bunch of important low-contrast detail in the mid range, it would become nearly invisible compared to the old scheme.
If you really care about the data from 0.0 to 0.05, and don’t really care about the data from 0.45 to 0.55 you can apply some function (e.g. a power function, or inverse smoothstep or something) to your data beforehand.
Look at the images again. 0.45 to 0.55 is green. Do the leaves on the front of the closest tree actually look harder to distinguish in Turbo than in Inferno?
It doesn't matter which function you apply to your data beforehand, it won't change that Turbo has more distinguishable steps than Viridis/Inferno. Turbo goes red-yellow-green-blue-black, Viridis goes yellow-green-black. Of course Turbo will be able to show more contrast.
I don't think they chose the image to best present their colormap. It seems more likely that they designed their colormap to work well for a few images, including this image.
Call it a very weak form of Hanlon's Razor
Anyway, as someone with protanomally: thank you! This looks so much better than Jet, and I just pinged my coworkers what they think about replacing our current rainbow map with this one. Having the d3 code already available makes that already low threshold even lower.
adjusting the hue parameter up to 1.4 will give more saturated colors
Per my reading of the blog post, they ran some images through a random color vision deficiency simulation website and decided that they looked good enough; while lightness plots are displayed for normal color vision, no such plots are shown for simulated color vision deficiency. Also, best I can tell, the simulator they used is based on a 1988 paper  instead of more recent and accurate techniques .
For an example of where color vision deficiency was actually properly considered for the development of a colormap, see Cividis .
I'm not convinced it's actually possible to create a colorblind-friendly rainbow colormap, particularly one without the shortcomings Jet presents for non-colorblind individuals. For all its faults, I find the banding in Jet to sometimes be a redeeming quality, since it makes it easier for me to match part of an image to the colorbar or other parts of the image. For example, in the image included in the blog post of the patio furniture and tree, I find that Turbo makes the tree appear deceptively close, due to my lack of differentiation in the green-orange part of the colormap; while the scene isn't shown with Jet, I suspect that the banding around yellow would make this misinterpretation less likely.
I may take a stab at analyzing the colormap for colorblind-friendliness, if I have time in the next few weeks. While the analysis in Nuñez et al. (2018) works well for sequential colormaps, I don't think it's the most appropriate for a rainbow colormap. For rainbow colormaps, I think the degree to which colors in non-adjacent parts of the colormap can be confused by colorblind individuals needs to be considered (it's the part of interpreting data presented with rainbow colormaps that causes me the most trouble). I'd have to think more about how to best construct a metric to evaluate this.
I like your idea of measuring "distances to all other colors" as a litmus test for color confusion issues. It would have been great to see the spread/standard deviation along with the average, in order to see which color was particularly problematic, rather than simply 'weak' (like Twilight).
You're right that under this rubric it's probably not possible to create a colorblind-friendly rainbow map. I was aiming for the colors to be distinguishable, but not 'equally different', which is a much higher bar.
I am also not convinced that even CIECAM02-UCS can give a meaningful answer for 'long distances'. Once hues are different, I think psychologically we give that 'difference' much more weight than the shade. For example I would guess most people would consider Red and Yellow more different than Red and an (equally dE different) darker shade of Red. So surely this would make rainbows even more problematic.
At the end of the day, Turbo was basically designed to steer Jet-lovers to a somewhat better place, so it looks like by your metric it does accomplish that. I agree that making it truly colorblind-optimal was not accomplished, and would require significant changes (if it's even possible).
I agree that CAM02-UCS is not necessarily accurate over "long distances." I'm also not completely convinced that using color vision deficiency simulation to shift colors and then using CAM02-UCS to estimate perceptual distance is all that accurate either, but it's the best approach using currently published models. It's my understanding that modern color appearance models were developed using matching experiments, e.g., asking a subject whether or not two colors are the same; for "long distances," it would probably be better to show two color pairs and ask which pair is more similar. If you're interested in how such appearance models have been developed, I'd recommend , which is fairly comprehensive (but also quite long).
By my metric and others, I agree that Turbo is certainly better than Jet. For normal color vision, the metric I developed is fairly flat across the colormap for Turbo, which is close to optimal as far as rainbow colormaps are concerned.
 Fairchild, Mark D. Color appearance models. John Wiley & Sons, 2013.
CAM02 is certainly much more uniform than LAB (hence OS's using it to print these days) but I think the problem is still fundamentally there (especially once we start talking about 'appearance' given a 'surround' and so forth).
The Fairchild book is indeed a classic and a heavy hitter as you mentioned :) I can't claim to have read it cover to cover.
Another interesting (and somewhat unconventional) book is Jan Koenderink's "Color for the Sciences".
For those of you still looking for perceptually uniform colour maps, including rainbows, check out the work of Peter Kovesi .
Personally, I'm still on the lookout for the 'perfect' colourmap that allows me to plot line graphs with a moderate number of curves (up to, say, nine) such that they are all distinct (i.e., nicely 'spaced' in colour) but have identical lightness -- which I'm assuming is the same thing as greyscale equivalent -- so as not to emphasize any one curve over another. Of course, the curves would then be indistinguishable when printed out in greyscale, but that's not important to me.
A colleague of mine directed me to the work of Maureen Stone , but I get the feeling that those colours are not perceptually identical (not that I've checked...).
In the case of Achromatopsia, the low and high ends are ambiguous. Since the condition affects 1 in 30,000 individuals (or 0.00003%), Turbo should be usable by 99.997% of the population.
1 in 30,000 is 0.003%, not 0.00003%.
sending pulses of highlighted cross-sections backwards at constant speed
Or “tilting” depth effect, like iPhones lock screen, but automated circular tilting.
As a Googler I'm surprised to see such an interface internally. Google systems have notoriously slow compile and test speeds for simple things (because the systems are optimized for very large projects). I think the difference between 500ms compilation and 10ms compilation is actually enormous.
This is some ok work by the folks at google, but screams of re-inventing the wheel 'because we're a silicon valley company and we innovate'.
Whoever gave the name ‘rainbow’ to their rainbow colormap?! It’s like naming a dog ‘dog’.
The practical issue is that not many people really use Rainbow instead of Jet, for the reasons I mentioned in the article (it sacrifices too many of the 'good bits' of Jet). So instead I chose to compare to the more 'widely recommended' maps.
But you're right, I should have thrown rainbow into the mix, even if I didn't have the space to write about it.
All of this said, Turbo is quite pleasing to the eye :).
I like Spectral a lot as well. I think if you're not after mega contrast it's probably the best bread-and-butter map out there for this kind of work.
Of course it's always good to have other colour maps to choose from, but the similarity between this proposed one and the ones that already exist makes it seem like they've only quickly glanced at other work in the field.
Seriously, Google, really?
That's what Turbo or Jet or any of the perceptually non-linear colormaps are doing but on a chromatic scale. You are lying to your audience. It is beyond me that all this hoo haa about aesthetics, "highlighting differences" and other qualitative bullshit takes precedence over objective truthful representation of data. Sigh.
Turbo/Jet also doesn't care about colorblindness which Viridis, Inferno, Magma and Plasma does as part of the Matplotlib 2.0 spec.
Personally I much prefer colormaps that contain any two primaries out of the three red/green/blue, but not all three. Chroma can be included (so mixing white and black). All the non-rainbow colormap pictures in the article can be described this way, and to my eyes the perceptual value is superior than all the rainbow-map images.
I found it a little strange that the blog post made a deal of calling out Jet for not being perceptually linear, and then announced that Turbo is not perceptually linear, just a bit smoother.
Nothing new under the sun and all...
What are the desirable properties of Jet? Why not use Viridis or Magma or any of the recent linear colormaps from matplotlib 2.0? These shortcomings were the exact reason why Viridis was created as exemplified in this brilliant talk: https://www.youtube.com/watch?v=xAoljeRJ3lU
I don't understand the point of Turbo.
> Turbo mimics the lightness profile of Jet, going from low to high back down to low, without banding. As such, its lightness slope is generally double that of Viridis, allowing subtle changes to be more easily seen. This is a valuable feature, since it greatly enhances detail when color can be used to disambiguate the low and high ends.
Why would anyone want low-to-high-to-low colormap?
> Viridis is a linear color map that is generally recommended when false color is needed because it is pleasant to the eye and it fixes most issues with Jet. Inferno has the same linear properties of Viridis, but is higher contrast, making it better for picking out detail. However, some feel that it can be harsh on the eyes. While this isn’t a concern for publishing, it does affect people’s choice when they must spend extended periods examining visualizations.
Personal taste vs scientific accuracy - I will take the latter unless we are doing plots for marketing materials. In my view this is not substantiated reason for going off and creating a more pleasant version of Jet; Turbo is still inaccurate and deceiving.
This is a deplorable attempt at creating a new colormap where the problem statement isn't clear in the first place.
"The background in the following images is barely distinguishable with Inferno (which is already punchier than Viridis), but clear with Turbo." (and presumably also Jet)
> Why would anyone want low-to-high-to-low colormap?
I'm assuming because "it greatly enhances detail when color can be used to disambiguate the low and high ends" and "to make cases where low values appear next to high values more distinct".
This has to do with the dynamic range of the plot - if the author wants to show the difference in a small region (say foreground or background or some region of the plot), clip the plot to that specific region to show it in a smaller dynamic range. Using a non-linear colormap to highlight differences in a particular region of the colormap defeats the entire point of having a colormap - its purpose to display data with perceptual linearity.
Basically, I posit that sacrificing perceptual linearity for increased hue range can be worth it for conveying qualitative information.
> What are the desirable properties of Jet?
Pretty much the only desirable property is that it used to be the Matlab default, and therefore has been used frequently and people are familiar with it.
Taking it as a starting point for a design is quite a poor choice. The design process here is pretty much just “we took jet and applied some blur to the apparent lightness”; this is not a principled or careful method, in my opinion.
One good use for this new color map might be: “My ignorant boss keeps insisting on using the jet color map even though it is terrible. I can drop this one in and he won’t notice the difference but it will be somewhat better, even if still problematical in many ways.”
This is sometimes called a “diverging” color map, and can be useful when e.g. you want to make choropleth map highlighting percentage of voters for Party A vs. Party B. You can make a 1/2:1/2 split of voters light and neutrally colored, and make the color get darker but with two different hues as the proportion gets more lopsided in favor of one party or the other.
But the lightness map on each side should still be more or less linear, and the obvious visual artifact created for the balance point has some concrete meaning.
Cf. https://www.kennethmoreland.com/color-maps/ https://www.kennethmoreland.com/color-advice/
It would be if all of the concerns were not actually addressed in the article. Nobody is taking inferno away from you, different scales are useful for different usages. Having an additional color dimension makes it easier to see gradients at a glance.
If this article had come up with an original improvement to Viridis, I’d be praising it.
Also, Turbo doesn’t give a fuck about colorblind considerations whereas Inferno and Viridis does.
I am pretty sure the scale should be always put somewhere next to the heat map so the audience can make their own judgement. A rainbow colormap gives you more depth than a single or dual hue one, I think that both have their merit depending on the data to visualize.
> Also, Turbo doesn’t give a fuck about colorblind considerations whereas Inferno and Viridis does.
There is a whole section of the article dedicated to that.
This is what surprised me. I expected work from Google AI to be based on some sound and novel theory, but this is literally just "we tweaked it until it looked okay on our monitor at the time".
Using Jet or Turbo is literally lying to your audience.
So if you use one and only one colorspace for some heatmap visualization, I think I would greatly appreciate using Inferno (or Helix, or similar) instead of Turbo in the most cases.
Covered: "When rendered in grayscale, the coloration will be ambiguous, since some of the lower values will look identical to higher values. Consequently, Turbo is inappropriate for grayscale printing and for people with the rare case of achromatopsia."
But if you plot it in CIELAB or CIECAM02-UCS, it's likely not a straight vector but rather a curved path. A vector would only interpolate between ~two hues (like Vidris, Inferno), whereas Turbo covers multiple hues. Have a look at the lightness profile plots in the post, it should give you a rough idea about how the vector must look in color spaces such as CIELAB.
I mean, we're just talking about a colour scale here right?
This sounds about as important as a debate over Helvetica Vs Times New Roman for research papers...
There are studies where doctors got to view MRI data under different color maps when screening for cancer. Using the 'right' map (which was different from their preferred choice) improved both the speed and accuracy of the diagnosis.
Basically changing color maps can radically change how you interpret the data being displayed.
That’s a reasonable discussion to have. In particular, Helvetica should not be used for setting long blocks of text.
The design choices in Helvetica make it an appropriate choice for posters, corporate logos, headings, ..., but not appropriate for research papers. Many other possible choices are more legible.
We could overlay very subtle queues in AR that effectively give the viewer super powers. Constructing the genie for the queues is the hard part.