12 ms·
Turbo, an Improved Rainbow Colormap for Visualization
- lbotos 7y agoDoes someone smarter than myself see a downside of using Turbo for heatmap visualizations?
- kmundnic 7y agoSome time ago I looked into this topic, and in my opinion the blog post misses two points: (1) Conversion to gray scale won't be good because the scale is not linear, which is important for printing, and (2) In Jet (and also, Turbo), high and low values of a measurement don't map well to colors. This is well described in the paper introducing cividis [1] (check out [2] for code). [1]: https://arxiv.org/ftp/arxiv/papers/1712/1712.01662.pdf https://arxiv.org/ftp/arxiv/papers/1712/1712.01662.pdf [2]: https://github.com/marcosci/cividis https://github.com/marcosci/cividis
- zimpenfish 7y ago> the blog post misses two points: (1) Conversion to gray scale won't be good [...] important for printing 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."
- dietr1ch 7y agoDo you need to use just a single one? It seems that interactively going through multiple scales and ranges might allow you to get a detailed view when needed.
- krick 7y agoWell, it's kind of specific visualization's designer's choice, and my main complaint isn't something the authors of Turbo are unaware of (it's like that by design), but I think non-linearity of the light profile is far bigger downside than is being admitted. I'm not speaking about unable to print in greyscale or "people with the rare case of achromatopsia": it is actually harder for me to say at a glance what regions are hotter on non-ligh-linear image (or, more precisely, non-light-monotonic image). I will make mistakes when tired while working with Jet/Turbo images, which I won't make while working with Inferno. 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.
- nielsbot 7y agoWouldn't a vector through CIELAB color space work too?
- wereHamster 7y agoIt's not defined as a vector through a perceptually uniform color space. They developed it manually, by tweaking parameters of a curve in sRGB until it looked good. 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.
- kbd 7y agoIf you have any interest in this topic, I’d strongly recommend watching this presentation at SciPy 2015 where Viridis and Inferno were first presented, when the developers of Matplotlib were coming up with a new default colormap to replace Jet: https://www.youtube.com/watch?v=xAoljeRJ3lU https://www.youtube.com/watch?v=xAoljeRJ3lU I'd love to see Turbo analyzed in the same fashion.
- Zarel 7y agoThe lightness plots midway through Google's blog post are made with CIECAM02-UCS, which is the same color space Matplotlib's video talked about using. 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.
- jacobolus 7y ago> making it easier to compare/contrast small differences 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.
- d--b 7y agoD3 has a scheme like this too: https://observablehq.com/@d3/color-schemes https://observablehq.com/@d3/color-schemes
- wereHamster 7y ago"like this"? Which one of the D3 color schemes is perceptually uniform and has an hue range which is as wide as Turbos?
- lighttower 7y agoSo grateful that colorblind is a first class citizen in their development. I drive a VW and their proximity sensor uses red on green background, I think.
- eitland 7y agoI see a possibility that UX can take a few steps forward : )
- AzuraJergen 7y agoWith close to 8% of the male population being colorblind, it means that if they are able to support such group, they are more likely to fully tap into the market.
- mpetroff 7y agoWhile color vision deficiency was considered, I wouldn't go nearly as far as saying that it was a first class citizen in the development of this colormap, which is unfortunate. 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 [1] instead of more recent and accurate techniques [2]. For an example of where color vision deficiency was actually properly considered for the development of a colormap, see Cividis [3]. [1] https://doi.org/10.1109/38.7759 https://doi.org/10.1109/38.7759 [2] https://doi.org/10.1109/TVCG.2009.113 https://doi.org/10.1109/TVCG.2009.113 [3] https://doi.org/10.1371/journal.pone.0199239 https://doi.org/10.1371/journal.pone.0199239
- lighttower 7y agoThe simulation website they used [1] is terrible. The filters they put on the images changes the "brightness" of the colors, which is how I distinguish among colors that are similar to me, like green and brown, or purple and blue (things that IRL are brown or maroon I call dark green; things that IRL are purple I see as dark blue). [1] https://www.color-blindness.com/coblis-color-blindness-simulator/ https://www.color-blindness.com/coblis-color-blindness-simul...
- spectramax 7y ago> Today we are happy to introduce Turbo, a new colormap that has the desirable properties of Jet while also addressing some of its shortcomings, such as false detail, banding and color blindness ambiguity. 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 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.
- jimbo1qaz 7y ago>The background in the following images is barely distinguishable with Inferno (which is already punchier than Viridis), but clear with Turbo.
- zimpenfish 7y ago> What are the desirable properties of Jet? Why not use Viridis or Magma "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".
- itronitron 7y agoI'm surprised there was no mention of cubehelix [1] which has the advantage of directly mapping to grayscale. 1. http://www.mrao.cam.ac.uk/~dag/CUBEHELIX/ http://www.mrao.cam.ac.uk/~dag/CUBEHELIX/
- rocqua 7y agoI wosh cube-helix had more saturated colors. It might be good for vizualizing, but it doesn't pop.
- itronitron 7y agoThere are a few parameters you can adjust to get brighter colors. A nice online implementation is at >> http://www.mrao.cam.ac.uk/~dag/CUBEHELIX/cubetry.html http://www.mrao.cam.ac.uk/~dag/CUBEHELIX/cubetry.html adjusting the hue parameter up to 1.4 will give more saturated colors
- vanderZwan 7y agoCubehelix does deserve a mention if only for being the first to bring this idea to the "mainstream", but for the record: this is also true for Inferno, Viridis, Cividis, etc.
- mbostock 7y agoHere’s a JavaScript implementation of the lookup table and polynomial approximation: https://observablehq.com/@mbostock/turbo https://observablehq.com/@mbostock/turbo
- vanderZwan 7y agoMy first thought after reading the article was actually "I wonder how quickly Mike Bostock will publish an Observable notebook showing his d3 port...." In less than three hours apparently, hahaha 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.
- bloopernova 7y agoThank you from this devops/sysadmin person. I didn't know about observable, it looks really useful!
- leetrout 7y agoObservable is awesome! Glitch.com is really swell, too, if you've not seen it! (No affiliation, I used it to teach JS / D3 last semester).
- leetrout 7y agoThank you for the quick implementation and reference!
- sitkack 7y agoMind blown, I now understand that I cannot start fathom all of the other vision systems, probably just on the property that are so alien to me that I can't even not understand them. 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.
- deleted 7y ago[deleted]
- kzrdude 7y agoThey should contribute it to matplotlib
- k_sze 7y agoOff-topic, but I like how the page is almost completely empty when tracking protection is enabled in Firefox for iOS. Seriously, Google, really?
- floatingatoll 7y agoYou may want to open a Webcompat issue about that, since it’ll get the attention of both Firefox and Google once it’s triaged.
- SomeOldThrow 7y agoFrom the blog post you have the impression the author was only allowed access to wikipedia.
- habosa 7y agoThe part which describes the development of Turbo is really cool. It shows off the value of having an interactive development setup that allows for fast and intuitive iteration. 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.
- antovsky 7y agoIndeed, it's a bit 'against the grain', but definitely possible and the advantage is obvious.
- choppaface 7y agoYou want colors to be meaningful, diverse, and stable. You also want the color map to scale gracefully (both in semantics as well as in code). Hash some meaningful value (e.g. class) to hue in HSV, and then you have your color. For distance, bucket by meter and lerp the hash-HSVs of the nearest bucket edges. Hash to color is the most flexible colormap.
- cperciva 7y agoIn case the authors read HN: 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%.
- melon_madness 7y agoFunny because they still got the 99.997% right
- krick 7y agoYeah, because 0.003% is indeed 0.00003, they just put a % sign and forgot to fix the actual number.
- melon_madness 7y agoMystery solved
- antovsky 7y agoThe author does! Much appreciated, will fix :)
- JBorrow 7y agoThis is very similar to the 'rainbow' colour map already available in many places, including matplotlib [1]. For people who are looking for maps with increased dynamic range, diverging colour maps already exist. There are even ones that are made up of _two_ linear colour maps, such as twilight. 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'. [1] https://matplotlib.org/3.1.0/tutorials/colors/colormaps.html https://matplotlib.org/3.1.0/tutorials/colors/colormaps.html
- deleted 7y ago[deleted]
- deleted 7y ago[deleted]
- robotresearcher 7y agoThe entire article including the very title explains that this is an improved version of Rainbow, of which they are very well aware and cite very clearly, and tweak for well explained reasons.
- JBorrow 7y agoSorry, my comment was unclear. They are comparing against jet, which is a colourmap that uses all the colours of the rainbow. They are not using the colourmap _called_ `rainbow`, to compare against.
- robotresearcher 7y agoYou are right and I was wrong. The ‘rainbow’ map at the matplotlib link happens to be plotted next to ‘jet’ and the lack of perceptual banding in comparison is clear. Looks like the Google author came up with a similar idea. Whoever gave the name ‘rainbow’ to their rainbow colormap?! It’s like naming a dog ‘dog’.
- 7y ago
- enriquto 7y agoturbo is nice, but visualizing depth maps using a 1D color palette is always a bad idea. Much better to add some simple shading (lambertian or ambient occlusion). Then you can still use the color palette to provide absolute depth cues, but the shading is much easier to interpret visually.
- krick 7y agoWhile arguments in the blogpost are mostly compelling (perhaps the most important to me is Jet/Turbo being far more high-contrast in the "colder" regions), I see Inferno as vastly superior still, mostly for the same reasons it was superior to Jet. All these colormaps are intended to represent one-dimensional gradient, as in "from hot to cold" and it is completely obvious when looking at Inferno. Jet & Turbo give a false impression of non-one-dimensionality. It might be a matter of being used to the colormap in question, but Jet is as old and common as it gets, and it still is not self-evident to me that the dark red is hotter than the very light yellow. I mean, obviously I know that, but I will tell you instantly without thinking what is the hottest and coldest regions on Inferno image, and I am significantly more likely to make a mistake when I'm tired with the Jet (and, presumably Turbo — for the same reasons).
- kelsolaar 7y agoThe fact that luminance peak, i.e. green, maps to the center of the input domain for Jet/Turbo is also very confusing and creates a strong emphasis for that region. It is unlikely to be a very desirable quality, especially when evaluating depth images like in their examples.
- keiru 7y agoThis is why I liked their C2 approach
- jsinai 7y agoThe luminance peak in the center is by design - that's clear in its parabolic gradient. Whether this is desirable or not depends on your use case. 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.
- SJSque 7y agoAn interesting development, and a useful contribution to the field. For those of you still looking for perceptually uniform colour maps, including rainbows, check out the work of Peter Kovesi [1]. 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 [2], but I get the feeling that those colours are not perceptually identical (not that I've checked...). [1] https://peterkovesi.com/projects/colourmaps/ https://peterkovesi.com/projects/colourmaps/ [2] http://ksrowell.com/blog-visualizing-data/2012/02/02/optimal-colors-for-graphs/ http://ksrowell.com/blog-visualizing-data/2012/02/02/optimal...
- londons_explore 7y agoDoes this actually matter much? 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...
- misnome 7y agoIf a data presentation is easy to misread, is it not worth researching if there is a way to present the data without the confusion?
- dagw 7y agoDoes this actually matter much? 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.
- jacobolus 7y ago> about as important as a debate over Helvetica Vs Times New Roman for research papers 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.
- thom 7y agoFor a lot of practical applciations, this seems a great option. I get the arguments for viridis/inferno etc, but the fact that on a very light or dark background, you are always losing the ability to see one end of the spectrum is annoying. I do think though, that this is an area where you really ought to be doing usability testing with real humans to measure the impact of one choice over the other (while respecting accessibility of course).
- boyadjian 7y agoI used to program the same type of colormap. It is a question of correct gamma correction.
- keiru 7y agoGamma correction and monitor settings usually go criminally unnoticed. I had problems just working with designers, I can't imagine what silent mistakes it produces in color-critical applications, like medical imaging. Some monitors are a finger brush away from auto-adjusting and messing up carefully selected settings.
- carlinmack 7y agoTheir colormap is very similar to the Sinebow [1] from 2011 [1] https://basecase.org/env/on-rainbows https://basecase.org/env/on-rainbows
- JulianMorrison 7y agoEven closer if you crop it to the part from 0 degrees to 240 degrees.
- kevin_thibedeau 7y agoSinebow is also much simpler to compute.
- antovsky 7y agoSinebow is really nice and smooth, but I'd say there is a bit too much green, and the green that's there is way more saturated than the rest of the colors (perhaps save magenta). The yellow is very sad and desaturated looking. The 0.5 value is also a drab cyan, making it hard to identify. I purposefully didn't include magenta into Turbo, so it could be used as a 'marking' color. Sinebow is also cyclic, which we purposefully didn't want (so that you could tell max from min), but for a color wheel style application this is a plus.
- dr_coffee 7y agoDo I spy Dear Imgui used for one of the colormap control panels? Love using this for whipping together quick interfaces. https://github.com/ocornut/imgui https://github.com/ocornut/imgui
- moeffju 7y agoIt looks like Processing to me
- ocornut 7y agoIt's clearly dear imgui on those screenshots.
- antovsky 7y agoDear ImGui indeed <3
- piyush_soni 7y agoHi, I just hope you read this (as I'm posting after 12 days). But since this is not apparent from the Blog, what kind of license is applicable on this new 'Turbo' colormap? Can we use it in a professional application? Thanks!
- antovsky 7y agoJust happened to not close the tab yet :) The licence is Apache-2.0, which is permissive, similar to MIT.
- piyush_soni 7y agoThanks!
- jedisct1 7y agoMoi j'assume. Serein sans la fume. J'contrôle, je résume.
- sagebird 7y agoFor video monitors displaying depth images, another obvious thing to explore is time. Eg: sending pulses of highlighted cross-sections backwards at constant speed Or “tilting” depth effect, like iPhones lock screen, but automated circular tilting.
- willis936 7y agoSubjectively, I went with plasma over other choices for my thesis (which I successfully defended yesterday!). I have used jet for many years for electrical test and measurement reports. For scientific writing, I felt there was a lot of value in colormaps that don't rely on chroma. I wish there was a jet-like colormap that used the entire color spectrum, but also was constantly increasing in brightness.
- dahart 7y agoThe problem with the rainbow color map is having green in the middle; green is the highest contrast color and stands out from red and blue and so gives the impression of being “brighter”, undermining the red-green-blue ordering. 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.
- spectramax 7y agoImagine if you have a non-linear function mapping to the height of the bars in a bar graph. For some input values, say, [0,25,50,75,100] we have a non-linear height function that calculates the heights of the bars, say [0px, 23px, 60px, 65px, 120px] - would you be ok with such a bar graph? 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.
- Zardoz84 7y agoI believe that I saw at the end of the article, some simulations of different colour blindness with Turbo.
- tammysmith 7y agoI have been seeing some strange calls from my husband phone and yet am unable to locate his phone or even get the number that have been calling him. i was so lucky enough that i went online to hire a hacker who was gonna help me in tracking my husband phone and also giving me access to his phone. while i was searching i saw jamesscotthacker@gmail.com as the best and i hired him this hacker was so good that he delivered me with my husband call logs,whatsapp,facebook, pictures, deleted call logs, all calls where recorded from last year till date i also had access to his text messages and also deleted messages. all this i had access right on my phone just with a very cheap price you can also text him :1(323)4214332
- ChrisLomont 7y agoHa - I did exactly this a decade ago in my Hypnocube products to avoid the tight bands on HSL color space. When animating colors along a hue cycle, the cyan and yellow would go by too fast. So I implemented piece-wise splines through the hue component, and I tune the parameter for each LED type we use to make them perceptually pleasing. Nothing new under the sun and all...
- andyjpb 7y agoNASA have a cool 6 part series on how to use colour for visualisations here: https://earthobservatory.nasa.gov/blogs/elegantfigures/2013/08/05/subtleties-of-color-part-1-of-6/ https://earthobservatory.nasa.gov/blogs/elegantfigures/2013/...