<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jet &#8211; Matthew Petroff</title>
	<atom:link href="https://mpetroff.net/tag/jet/feed/" rel="self" type="application/rss+xml" />
	<link>https://mpetroff.net</link>
	<description>mpetroff.net</description>
	<lastBuildDate>Wed, 15 Jul 2020 23:40:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Discernibility of (Rainbow) Colormaps</title>
		<link>https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/</link>
					<comments>https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/#respond</comments>
		
		<dc:creator><![CDATA[Matthew Petroff]]></dc:creator>
		<pubDate>Mon, 26 Aug 2019 01:57:08 +0000</pubDate>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[color blindness]]></category>
		<category><![CDATA[color vision deficiency]]></category>
		<category><![CDATA[colormap]]></category>
		<category><![CDATA[Jet]]></category>
		<category><![CDATA[Turbo]]></category>
		<guid isPermaLink="false">https://mpetroff.net/?p=2974</guid>

					<description><![CDATA[Earlier this month, the Turbo rainbow colormap was released and publicized on the Google AI Blog. This colormap attempts to mitigate the banding issues in the existing Jet rainbow colormap, while retaining the advantages of its high contrast; note that &#8230; <a href="https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><span class="dropcap">E</span>arlier this month, the <em>Turbo</em> rainbow colormap was released and <a href="https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html">publicized on the Google AI Blog</a>. This colormap attempts to mitigate the banding issues in the existing <a href="https://www.mathworks.com/help/matlab/ref/jet.html"><em>Jet</em></a> rainbow colormap, while retaining the advantages of its high contrast; note that <em>Turbo</em> is not perceptually uniform, so care should be used where high accuracy is required, particularly for local differences. What particularly caught my attention was the fact that the author attempted to address the color vision deficiency-related shortcomings of <em>Jet</em>. I am of opinion that the creation of a colorblind-friendly rainbow colormap probably isn&#8217;t possible, since the confusion axes of color vision deficiencies become problematic once hue become the primary discriminator in a colormap instead of lightness;<sup id="rf1-2974"><a href="https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/#fn1-2974" title=" It probably &lt;em&gt;is&lt;/em&gt; possible to create a colorblind-friendly rainbow colormap for a particular type of color vision deficiency. However, creating such a colormap that simultaneously works for multiple types of color vision deficiencies as well as for normal color vision is what is likely impossible. " rel="footnote">1</a></sup> this made me a bit suspicious of the claim and prompted further investigation on my part. While the author&#8217;s attempt to consider color vision deficiencies in the creation of the colormap is laudable, it was unfortunately based on what I feel is a flawed analysis. Depth images visualized using the colormap were fed into an <a href="https://www.color-blindness.com/coblis-color-blindness-simulator/" rel="nofollow">online color vision deficiency simulator</a>, and the results were evaluated qualitatively by individuals with normal color vision; however, this particular simulator is, best I can tell, based on an outdated technique from a 1988 paper<sup id="rf2-2974"><a href="https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/#fn2-2974" title=" G. W. Meyer and D. P. Greenberg, &#8220;Color-defective vision and computer graphics displays,&#8221; in &lt;i&gt;IEEE Computer Graphics and Applications&lt;/i&gt;, vol. 8, no. 5, pp. 28-40, Sept. 1988. &lt;a href=&quot;https://doi.org/10.1109/38.7759&quot;&gt;doi:10.1109/38.7759&lt;/a&gt; " rel="footnote">2</a></sup> instead of the more recent and accurate approach of Machado et al. (2009).<sup id="rf3-2974"><a href="https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/#fn3-2974" title=" G. M. Machado, M. M. Oliveira, and L. A. F. Fernandes, &#8220;A Physiologically-based Model for Simulation of Color Vision Deficiency,&#8221; in &lt;i&gt;IEEE Transactions on Visualization and Computer Graphics&lt;/i&gt;, vol. 15, no. 6, pp. 1291-1298, Nov.-Dec. 2009. &lt;a href=&quot;https://doi.org/10.1109/TVCG.2009.113&quot;&gt;doi:10.1109/TVCG.2009.113&lt;/a&gt; " rel="footnote">3</a></sup> Below, I attempt what I feel to be a more accurate and quantitative analysis, which shows that <em>Turbo</em> isn&#8217;t really colorblind-friendly, despite the attempt to make it so.<span id="more-2974"></span></p>
<p>Since rainbow colormaps are best suited for quickly judging values, their most important property is that colors in non-adjacent sections of the colormap are not confused.<sup id="rf4-2974"><a href="https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/#fn4-2974" title=" When differences between adjacent colors are important, a perceptually uniform colormap should be used. " rel="footnote">4</a></sup> To evaluate this quantitatively, I devised the following metric. For each color in the colormap, the perceptual distance in CAM02-UCS<sup id="rf5-2974"><a href="https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/#fn5-2974" title=" Luo M.R., Li C. (2013) CIECAM02 and Its Recent Developments. In: Fernandez-Maloigne C. (eds) Advanced Color Image Processing and Analysis. Springer, New York, NY. &lt;a href=&quot;https://doi.org/10.1007/978-1-4419-6190-7_2&quot;&gt;doi:10.1007/978-1-4419-6190-7_2&lt;/a&gt; " rel="footnote">5</a></sup> is calculated for every additional color in the colormap. The weighted average of the perceptual distances is then taken, with the squares of the color location distances in the colormap used as weights. For color vision deficiencies, the method of Machado et al. (2009) is used to adjust the colors before the perceptual distance is calculated, as I did for <a href="https://mpetroff.net/2018/10/randomly-generating-color-sets-with-a-minimum-perceptual-distance/">randomly generating color sets</a> and as was done in the development of <em>Cividis</em>;<sup id="rf6-2974"><a href="https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/#fn6-2974" title=" J. R. Nuñez, C. R. Anderton, and R. S. Renslow. &#8220;Optimizing colormaps with consideration for color vision deficiency to enable accurate interpretation of scientific data,&#8221; in &lt;i&gt;PLoS ONE&lt;/i&gt; vol. 13, no. 7, pp. e0199239, Aug. 2018. &lt;a href=&quot;https://doi.org/10.1371/journal.pone.0199239&quot;&gt;doi:10.1371/journal.pone.0199239&lt;/a&gt; " rel="footnote">6</a></sup> a severity of 100 was used, indicating deuteranopia, protanopia, and tritanopia. Thus, similar colors in distant locations in the colormap are penalized.</p>
<p>We will start with rainbow colormaps for our evaluation of colormaps by this metric, first considering <em>Jet</em>, the new <em>Turbo</em> colormap, and Matplotlib&#8217;s existing <em>Rainbow</em> colormap, which also attempts to address some of <em>Jet</em>&rsquo;s shortcomings. In the plot legends, the abbreviations &#8220;Norm,&#8221; &#8220;Deut,&#8221; &#8220;Prot,&#8221; and &#8220;Trit&#8221; are used for normal color vision, deuteranopia, protanopia, and tritanopia, respectively. Higher perceptual distance, ΔE, is better, as are smoother and more consistent discernibility lines.</p>
<p style="text-align: center;"><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2019/08/jet.svg" alt="Discernibility plot of Jet colormap" /></p>
<p style="text-align: center;"><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2019/08/turbo.svg" alt="Discernibility plot of Turbo colormap" /></p>
<p style="text-align: center;"><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2019/08/rainbow.svg" alt="Discernibility plot of Rainbow colormap" /></p>
<p>The discernibility lines for <em>Turbo</em> and <em>Rainbow</em> are much smoother than those for <em>Jet</em>, since both mitigate <em>Jet</em>&rsquo;s significant banding issues. Although <em>Jet</em>&rsquo;s banding issues are generally considered problematic, I, as a colorblind individual, find the banding 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 normal color vision, <em>Turbo</em>&rsquo;s discernibility line is smooth and fairly flat, a significant improvement over <em>Jet</em>, and a minor improvement over <em>Rainbow</em>, although <em>Turbo</em> arguably looks better. However, the discernibility lines for various color vision deficiencies are not nearly as uniform, for either <em>Turbo</em> or <em>Rainbow</em>. This means that for colorblind individuals some parts of the colormaps are considerably more difficult to discern than others, making data plotted with them liable to misinterpretation. Thus, while <em>Turbo</em> and <em>Rainbow</em> improve upon some of <em>Jet</em>&rsquo;s shortcomings, neither is colorblind-friendly.</p>
<p>Next, we will consider cyclic rainbow colormaps. The classic, and severely flawed, version is the <em>HSV</em> colormap, and the improved version is <a href="https://basecase.org/env/on-rainbows"><em>Sinebow</em></a>; in regards to non-cyclic rainbow colormaps, these are analogous to <em>Jet</em> and <em>Turbo</em>, respectively. <a href="https://github.com/bastibe/twilight"><em>Twilight</em></a>, a perceptually uniform cyclic colormap, is also considered.</p>
<p style="text-align: center;"><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2019/08/hsv.svg" alt="Discernibility plot of HSV colormap" /></p>
<p style="text-align: center;"><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2019/08/sinebow.svg" alt="Discernibility plot of Sinebow colormap" /></p>
<p style="text-align: center;"><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2019/08/twilight.svg" alt="Discernibility plot of Twilight colormap" /></p>
<p>In evaluating the metric for these colormaps, their cyclic nature was taken into consideration in the colormap location distance calculation. <em>Sinebow</em>&rsquo;s discernibility lines are much smoother than <em>HSV</em>&rsquo;s, but neither does well for color vision deficiencies. <em>Twilight</em> is much more consistent and colorblind-friendly, although at the expense of average discernibility.</p>
<p>Now, we will consider two perceptually uniform linear colormaps, <em>Viridis</em>, the Matplotlib default, and <em>Cividis</em> a derivative designed with color vision deficiencies in mind.</p>
<p style="text-align: center;"><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2019/08/viridis.svg" alt="Discernibility plot of Viridis colormap" /></p>
<p style="text-align: center;"><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2019/08/cividis.svg" alt="Discernibility plot of Cividis colormap" /></p>
<p>The &#8220;V&#8221; shape of the metric for these colormaps is expected, since for a linear colormap, the center is closest to the greatest number of other colors. Note that the discernibility of <em>Cividis</em>, which was optimized with color vision deficiencies in mind, is the most consistent between normal color vision and various color vision deficiencies, although <em>Viridis</em> is also okay in this regard, and both are considerably better than any of the rainbow colormaps previously presented.</p>
<p>Finally, diverging colormaps will be evaluated. Here, we consider Matplotlib&#8217;s <em>Coolwarm</em> colormap and Peter Kovesi&#8217;s <a href="https://peterkovesi.com/projects/colourmaps/"><em>Blue-Gray-Yellow</em></a> colormap.</p>
<p style="text-align: center;"><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2019/08/coolwarm.svg" alt="Discernibility plot of Coolwarm colormap" /></p>
<p style="text-align: center;"><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2019/08/cet_bjy.svg" alt="Discernibility plot of Blue-Gray-Yellow colormap" /></p>
<p>These show a &#8220;V&#8221; shape, similar to linear colormaps, although this is less pronounced in <em>Coolwarm</em>. The <em>Blue-Gray-Yellow</em> colormap is linearly increasing in lightness and perceptually uniform, so its discernibility profile is much closer to that of perceptually uniform linear colormaps.</p>
<p>In summary, while <em>Turbo</em> does ameliorate many of the issues with <em>Jet</em>, neither <em>Turbo</em> nor any of the other rainbow colormaps evaluated here are colorblind-friendly, at least per the metric evaluated. It is likely that it is not possible to construct a rainbow colormap with such a property, unlike for linear, diverging, and cyclic colormaps. The Jupyter notebook used to evaluate the colormaps and produce the plots <a href="https://nbviewer.jupyter.org/urls/mpetroff.net/wp-content/uploads/2019/08/colormap-discernibility.ipynb">is available</a>.</p>
<p>Edit (2020-07-15): Replaced last plot (and updated Jupyter notebook), since the non-diverging BGY colormap had been accidentally used originally instead of the BJY colormap. All plots were also updated for improved readability.</p>
<hr class="footnotes"><ol class="footnotes" style="list-style-type:decimal"><li id="fn1-2974"><p > It probably <em>is</em> possible to create a colorblind-friendly rainbow colormap for a particular type of color vision deficiency. However, creating such a colormap that simultaneously works for multiple types of color vision deficiencies as well as for normal color vision is what is likely impossible. &nbsp;<a href="https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/#rf1-2974" class="backlink" title="Return to footnote 1.">&#8617;</a></p></li><li id="fn2-2974"><p > G. W. Meyer and D. P. Greenberg, &#8220;Color-defective vision and computer graphics displays,&#8221; in <i>IEEE Computer Graphics and Applications</i>, vol. 8, no. 5, pp. 28-40, Sept. 1988. <a href="https://doi.org/10.1109/38.7759">doi:10.1109/38.7759</a> &nbsp;<a href="https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/#rf2-2974" class="backlink" title="Return to footnote 2.">&#8617;</a></p></li><li id="fn3-2974"><p > G. M. Machado, M. M. Oliveira, and L. A. F. Fernandes, &#8220;A Physiologically-based Model for Simulation of Color Vision Deficiency,&#8221; in <i>IEEE Transactions on Visualization and Computer Graphics</i>, vol. 15, no. 6, pp. 1291-1298, Nov.-Dec. 2009. <a href="https://doi.org/10.1109/TVCG.2009.113">doi:10.1109/TVCG.2009.113</a> &nbsp;<a href="https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/#rf3-2974" class="backlink" title="Return to footnote 3.">&#8617;</a></p></li><li id="fn4-2974"><p > When differences between adjacent colors are important, a perceptually uniform colormap should be used. &nbsp;<a href="https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/#rf4-2974" class="backlink" title="Return to footnote 4.">&#8617;</a></p></li><li id="fn5-2974"><p > Luo M.R., Li C. (2013) CIECAM02 and Its Recent Developments. In: Fernandez-Maloigne C. (eds) Advanced Color Image Processing and Analysis. Springer, New York, NY. <a href="https://doi.org/10.1007/978-1-4419-6190-7_2">doi:10.1007/978-1-4419-6190-7_2</a> &nbsp;<a href="https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/#rf5-2974" class="backlink" title="Return to footnote 5.">&#8617;</a></p></li><li id="fn6-2974"><p > J. R. Nuñez, C. R. Anderton, and R. S. Renslow. &#8220;Optimizing colormaps with consideration for color vision deficiency to enable accurate interpretation of scientific data,&#8221; in <i>PLoS ONE</i> vol. 13, no. 7, pp. e0199239, Aug. 2018. <a href="https://doi.org/10.1371/journal.pone.0199239">doi:10.1371/journal.pone.0199239</a> &nbsp;<a href="https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/#rf6-2974" class="backlink" title="Return to footnote 6.">&#8617;</a></p></li></ol>]]></content:encoded>
					
					<wfw:commentRss>https://mpetroff.net/2019/08/discernibility-of-rainbow-colormaps/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Content Delivery Network via Amazon Web Services: CloudFront: cdn0.mpetroff.net
Minified using Disk

Served from: mpetroff.net @ 2026-03-31 01:36:35 by W3 Total Cache
-->