<?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>color vision deficiency &#8211; Matthew Petroff</title>
	<atom:link href="https://mpetroff.net/tag/color-vision-deficiency/feed/" rel="self" type="application/rss+xml" />
	<link>https://mpetroff.net</link>
	<description>mpetroff.net</description>
	<lastBuildDate>Tue, 09 May 2023 00:39:57 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>An Improved CMB Map Colormap</title>
		<link>https://mpetroff.net/2023/05/an-improved-cmb-map-colormap/</link>
					<comments>https://mpetroff.net/2023/05/an-improved-cmb-map-colormap/#respond</comments>
		
		<dc:creator><![CDATA[Matthew Petroff]]></dc:creator>
		<pubDate>Tue, 09 May 2023 00:38:44 +0000</pubDate>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[CLASS]]></category>
		<category><![CDATA[CMB]]></category>
		<category><![CDATA[color vision deficiency]]></category>
		<category><![CDATA[colormap]]></category>
		<category><![CDATA[map]]></category>
		<guid isPermaLink="false">https://mpetroff.net/?p=3640</guid>

					<description><![CDATA[Although a variety of colormaps have previously been specifically developed for displaying cosmic microwave background (CMB) maps, none of these have been designed with perceptual uniformity or color-vision-deficiency (CVD) accessibility in mind. To improve upon this status quo, in support &#8230; <a href="https://mpetroff.net/2023/05/an-improved-cmb-map-colormap/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><span class="dropcap">A</span>lthough a variety of colormaps have <a href="https://ui.adsabs.harvard.edu/abs/1994ApJ...436..423B/abstract">previously</a> <a href="https://ui.adsabs.harvard.edu/abs/1996ApJ...464L...1B/abstract">been</a> <a href="https://ui.adsabs.harvard.edu/abs/2013ApJS..208...20B/abstract">specifically</a> <a href="https://ui.adsabs.harvard.edu/abs/2020A%26A...641A...1P/abstract">developed</a> for displaying cosmic microwave background (CMB) maps, none of these have been designed with perceptual uniformity or color-vision-deficiency (CVD) accessibility in mind. To improve upon this status quo, in support of <a href="https://arxiv.org/abs/2305.01045">publications</a><sup id="rf1-3640"><a href="https://mpetroff.net/2023/05/an-improved-cmb-map-colormap/#fn1-3640" title=" Y. Li et al., &#8220;CLASS Data Pipeline and Maps for 40&thinsp;GHz Observations through 2022&#8221;, &lt;a href=&quot;https://arxiv.org/abs/2305.01045&quot;&gt;arXiv:2305.01045&lt;/a&gt;. " rel="footnote">1</a></sup> for the 2022 data release for the <a href="https://sites.krieger.jhu.edu/class/">Cosmology Large Angular Scale Surveyor (CLASS)</a>, I used Matplotlib&#8217;s <a href="https://github.com/matplotlib/viscm">Viscm</a> tool to develop a new diverging colormap that resembles the <em>Planck</em> colormap but is mostly perceptually uniform and is perceived similarly by both individuals with typical color vision and those with red or green color-vision deficiencies. The Q-band Stokes <em>U</em> map from the CLASS paper, which uses the new colormap, is shown below.</p>
<p><a href="https://cdn0.mpetroff.net/wp-content/uploads/2023/05/class-u-map.png" title="CLASS Q-band U Map with New Colormap" data-sbox="3640"><img loading="lazy" decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2023/05/class-u-map-640x320.png" alt="A CMB map in equatorial coordinates is shown under Mollweide projection. Data are shown for around 70% of the sky, and the Galactic plane is visible. The new colormap discussed in this blog post is used, starting from blue to a warm light gray and then to red." width="640" height="320" class="aligncenter size-large wp-image-3655" srcset="https://cdn0.mpetroff.net/wp-content/uploads/2023/05/class-u-map-640x320.png 640w, https://cdn0.mpetroff.net/wp-content/uploads/2023/05/class-u-map-300x150.png 300w, https://cdn0.mpetroff.net/wp-content/uploads/2023/05/class-u-map.png 1280w" sizes="auto, (max-width: 640px) 100vw, 640px" /></a><span id="more-3640"></span></p>
<p>Starting with prior art, the <em>Planck</em> colormap is a diverging colormap, but it has discontinuities in its perceptual derivative, causing visible banding issues. Here is the output for it from Viscm.</p>
<p><a href="https://cdn0.mpetroff.net/wp-content/uploads/2023/05/planck.png" title="Viscm output for the Planck colormap" data-sbox="3640"><img loading="lazy" decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2023/05/planck-640x384.png" alt="A visualization shows abrupt changes in the perceptual derivative of the Planck colormap, which goes from blue to red, and visible banding in test images." width="640" height="384" class="aligncenter size-large wp-image-3647" srcset="https://cdn0.mpetroff.net/wp-content/uploads/2023/05/planck-640x384.png 640w, https://cdn0.mpetroff.net/wp-content/uploads/2023/05/planck-300x180.png 300w, https://cdn0.mpetroff.net/wp-content/uploads/2023/05/planck-1536x922.png 1536w, https://cdn0.mpetroff.net/wp-content/uploads/2023/05/planck-1280x768.png 1280w, https://cdn0.mpetroff.net/wp-content/uploads/2023/05/planck.png 2000w" sizes="auto, (max-width: 640px) 100vw, 640px" /></a></p>
<p>And here is how it performs by <a href="/2019/08/discernibility-of-rainbow-colormaps/">the CVD metric I previously developed</a> to evaluate the <em>Turbo</em> colormap (which performs poorly by it). Along with the cusps from the issues with the perceptual derivative, there is a clear imbalance in the metric around the center of the colormap for red and green color-vision deficiencies.</p>
<p style="text-align: center;"><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2023/05/planck.svg" alt="A plot shows lines with cusps for the CVD metric as a function of colormap position. For deuteranopia and protanopia, there is a clear imbalance around the center of the colormap." /></p>
<p>As a first attempt to improve upon this, I fit splines to the color values and applied various levels of smoothing. With small amounts of smoothing, this rounded off the perceptual discontinuities&mdash;fixing the worst of the issues&mdash;but left much room for improvement; applying more aggressive smoothing further improved the perceptual issues but also more significantly changed the colormap in a manner that my colleagues did not like aesthetically.</p>
<p>For my second attempt, I started by trying to replicate the <em>Planck</em> colormap in Viscm. In the process, I solicited feedback from my colleagues, resulting in tweaks such as moving the mid point from a neutral gray to a slightly warmer color temperature. While this resolved the perceptual uniformity issues, parts of the colormap were less than uniform for individuals with color vision deficiencies. I then iteratively made changes and ran the results through the CVD metric, until the results roughly matched between typical color vision and red and green color-vision deficiencies. Here is the output of Viscm for the new colormap.</p>
<p><a href="https://cdn0.mpetroff.net/wp-content/uploads/2023/05/class.png" title="Viscm output for new CLASS colormap" data-sbox="3640"><img loading="lazy" decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2023/05/class-640x384.png" alt="A visualization shows the uniformity of the perceptual derivative of the CLASS colormap, which goes from blue to red, and test images do not show banding." width="640" height="384" class="aligncenter size-large wp-image-3650" srcset="https://cdn0.mpetroff.net/wp-content/uploads/2023/05/class-640x384.png 640w, https://cdn0.mpetroff.net/wp-content/uploads/2023/05/class-300x180.png 300w, https://cdn0.mpetroff.net/wp-content/uploads/2023/05/class-1536x922.png 1536w, https://cdn0.mpetroff.net/wp-content/uploads/2023/05/class-1280x768.png 1280w, https://cdn0.mpetroff.net/wp-content/uploads/2023/05/class.png 2000w" sizes="auto, (max-width: 640px) 100vw, 640px" /></a></p>
<p>And here is how it performs by my previously-developed metric.</p>
<p style="text-align: center;"><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2023/05/class.svg" alt="A plot shows relatively smooth and consistent lines for the CVD metric as a function of colormap position for the new CLASS colormap for typical color vision, deuteranopia, and protanopia. The metric for tritanopia diverges a bit from the other values." /></p>
<p>While a significant improvement upon the status quo, the new colormap is not perfect, and I think other diverging colormaps such as Peter Kovesi&#8217;s <a href="https://colorcet.com/gallery.html">CET-D07 colormap</a> (<code>cet_bjy</code> in Python&#8217;s <a href="https://colorcet.holoviz.org/">Colorcet package</a>), which is both linear and diverging, or some of <a href="https://www.fabiocrameri.ch/colourmaps/">Fabio Crameri&#8217;s colormaps</a> are better choices for most applications. However, the new colormap is probably good enough for CMB maps, where exact values do not need to be read off of the maps by eye, while keeping a similar aesthetic to existing publications.</p>
<p>A <a href="https://cdn0.mpetroff.net/wp-content/uploads/2023/05/colormap.py">Python file</a> that can be imported to use the colormap with Matplotlib or Healpy and the <a href="https://cdn0.mpetroff.net/wp-content/uploads/2023/05/colormap.jscm">JSCM output</a> from Viscm are available.</p>
<hr class="footnotes"><ol class="footnotes" style="list-style-type:decimal"><li id="fn1-3640"><p > Y. Li et al., &#8220;CLASS Data Pipeline and Maps for 40&thinsp;GHz Observations through 2022&#8221;, <a href="https://arxiv.org/abs/2305.01045">arXiv:2305.01045</a>. &nbsp;<a href="https://mpetroff.net/2023/05/an-improved-cmb-map-colormap/#rf1-3640" class="backlink" title="Return to footnote 1.">&#8617;</a></p></li></ol>]]></content:encoded>
					
					<wfw:commentRss>https://mpetroff.net/2023/05/an-improved-cmb-map-colormap/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Update on Figure Caption Color Indicators</title>
		<link>https://mpetroff.net/2020/10/update-on-figure-caption-color-indicators/</link>
					<comments>https://mpetroff.net/2020/10/update-on-figure-caption-color-indicators/#respond</comments>
		
		<dc:creator><![CDATA[Matthew Petroff]]></dc:creator>
		<pubDate>Sat, 31 Oct 2020 21:15:08 +0000</pubDate>
				<category><![CDATA[Research]]></category>
		<category><![CDATA[annotations]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[color blindness]]></category>
		<category><![CDATA[color vision deficiency]]></category>
		<category><![CDATA[figure captions]]></category>
		<category><![CDATA[scientific literature]]></category>
		<guid isPermaLink="false">https://mpetroff.net/?p=3285</guid>

					<description><![CDATA[Last year, I published a blog post on figure caption color indicators. The positive feedback I received on it from a number of individuals prompted me to revisit the subject. At the time, I did not have a good way &#8230; <a href="https://mpetroff.net/2020/10/update-on-figure-caption-color-indicators/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><span class="dropcap">L</span>ast year, I published a blog post on <a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/">figure caption color indicators</a>. The positive feedback I received on it from a number of individuals prompted me to revisit the subject. At the time, I did not have a good way of locating published examples of such caption indicators and was only able to locate a few published examples with shape indicators but none with color indicators. When thinking about revisiting the subject, I had the epiphany that although searching for such indicators in the published literature is next to impossible, searching in the <span>L<sup style="text-transform: uppercase; vertical-align: -0.3em; margin-left: -0.2em;">a</sup>T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> source markup for papers is not. As arXiv provides <a href="https://arxiv.org/help/bulk_data">bulk access</a> to the T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> source markup for its pre-prints, this provided a large corpus of manuscripts to search through. After finding examples in pre-prints, I was then able to see if the indicators survived the publication process and was thereby able to locate well over one hundred examples of color line or shape indicators in the figure captions of published academic papers.<span id="more-3285"></span></p>
<p>I broke the process into four steps: acquiring the data, extracting <span>L<sup style="text-transform: uppercase; vertical-align: -0.3em; margin-left: -0.2em;">a</sup>T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> commands from caption environments, finding potential figure caption candidates, and verifying these candidates. As the arXiv source archive is well over 1&thinsp;TB in size, it is provided in an AWS S3 bucket configured such that the requester pays for bandwidth, which would result in a bandwidth bill of >$100 if downloaded directly. As I was only interested in the T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> source and not the figures, which account for most of the total file size, and since AWS does not charge to transfer between S3 buckets and EC2 instances in the same region, I first ran a script on an EC2 instance to download from arXiv&#8217;s S3 bucket and extract and repackage just the T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> source files. This allowed me to greatly reduce the amount of data transfer required and allowed me to download the full T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> source file corpus for <$5. Next, I used the <a href="https://github.com/alvinwan/TexSoup">TexSoup</a> Python package to process the T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> files and produce a list of <span>L<sup style="text-transform: uppercase; vertical-align: -0.3em; margin-left: -0.2em;">a</sup>T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> commands used in the <code>caption</code> environment. I then used a final script to search for papers that used command names that referenced colors or shapes to compile a list of likely paper candidates and produced HTML files for each year containing a link to the PDF for each candidate paper as well as the full T<sub style="text-transform: uppercase; vertical-align: 0.2em; margin-left: -0.15em;">e</sub>X</span> source for the identified caption, with the matching commands highlighted. Finally, I manually verified the papers using the HTML files that were produced. Except for trivial false positivies, which could be identified by looking at the included caption source, I manually looked at the PDF for each candidate paper, verified that it included a visual caption indicator, and classified the caption indicator if it had one. For papers that included indicators, I then attempted to locate the published version of record of the paper and did the same for it.</p>
<p>Through this process, my scripts located around ~5100 paper candidates from the beginning of arXiv in 1992 through the end of June 2020. I manually verified these candidates for papers submitted prior to the end of 2016; these accounted for ~2000 candidates, of which I verified ~1100 papers to have some sort of visual caption indicator. For ~700 of these, I was able to verify the presence of some form of visual caption indicator in the published version of record. Of these, ~60% included a black shape or line indicator, ~25% included a color shape or line indicator, and the remainder included colored text. The fraction of papers with color shape or line indicators was higher in the pre-prints, since it was not uncommon for the published version to include a black indicator when the pre-print included a colored indicator. I stopped at the end of 2016 since the verification process was quite time consuming, and I could only look at so many papers before giving up.</p>
<p>These findings show that the idea of using figure color caption indicators is by no means a new idea. However, it&#8217;s still quite rare in relative terms, since at most a couple thousand out of arXiv&#8217;s ~1.7 million pre-prints include such indicators. Most of the examples I found used a colored shape (<span style="color: #1f77b4;">&#9632;</span>) or line (<span style="color: #1f77b4;"><b>&mdash;</b></span>) in parentheses, or both in cases where both a line and marker were used. My proposal to use a colored underline does still appear to have been a novel concept, but it proved quite complicated to implement, so using shapes or lines in parentheses is much more practical, since it is simpler and is evidentially compatible with many publishers&#8217; workflows. Furthermore, the existing examples can be used as evidence when complaining about paper proofs, after the typesetter predictably removes the indicators, to show that the indicators are possible and that they can and should be included in the final published version of the paper.</p>
<p>One color indicator that I recommend against using is colored text, since it can be difficult to read and often violates <a href="https://www.w3.org/TR/WCAG21/#contrast-minimum">WCAG contrast guidelines</a>. Its use seems particularly common in the computer vision literature and, to a lesser degree, the machine learning literature. It is often used to highlight table entries, a purpose much better served by using italic, bold, or bold&ndash;italic text.</p>
<p>I have made the scripts used for this analysis, the paper candidates, and the final verified results <a href="https://cdn0.mpetroff.net/wp-content/uploads/2020/10/arxiv-figure-caption-color-indicators.zip">available</a>. The final verified results are also <a href="https://cdn0.mpetroff.net/wp-content/uploads/2020/10/papers.html">available separately</a> for easy viewing. Note that the verified results are incomplete and may contain errors.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mpetroff.net/2020/10/update-on-figure-caption-color-indicators/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Color Cycle Survey Update</title>
		<link>https://mpetroff.net/2020/01/color-cycle-survey-update/</link>
					<comments>https://mpetroff.net/2020/01/color-cycle-survey-update/#respond</comments>
		
		<dc:creator><![CDATA[Matthew Petroff]]></dc:creator>
		<pubDate>Fri, 31 Jan 2020 23:38:30 +0000</pubDate>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[color blindness]]></category>
		<category><![CDATA[color cycle]]></category>
		<category><![CDATA[color set]]></category>
		<category><![CDATA[color vision deficiency]]></category>
		<category><![CDATA[machine learning]]></category>
		<category><![CDATA[neural network]]></category>
		<guid isPermaLink="false">https://mpetroff.net/?p=3171</guid>

					<description><![CDATA[Since my last update on the Color Cycle Survey, there have been no drastic changes, but responses have continued to trickle in. There are now ~13.7k total responses, with ~6k responses each for the six color and eight color components. &#8230; <a href="https://mpetroff.net/2020/01/color-cycle-survey-update/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><span class="dropcap">S</span>ince my <a href="https://mpetroff.net/2019/06/preliminary-color-cycle-order-ranking-results/">last update</a> on the <a href="https://colorcyclesurvey.mpetroff.net/">Color Cycle Survey</a>, there have been no drastic changes, but responses have continued to trickle in. There are now ~13.7k total responses, with ~6k responses each for the six color and eight color components. This long-delayed&mdash;and somewhat brief&mdash;post serves as an update to my previously published six color analysis, while also extending it to eight colors.</p>
<p><a href="https://colorcyclesurvey.mpetroff.net/" style="text-decoration: none; color: #fff;"></p>
<div style="width: 100%;background: #88749d;text-align: center;font-size: xx-large;padding: 30px 0;">&#10145; Click Here to Take Color Cycle Survey &#11013;</div>
<p></a></p>
<p/>
<p>I have only made minor changes to the previously detailed analysis procedures (see previous <a href="https://mpetroff.net/2019/05/preliminary-color-cycle-set-ranking-results/">set ranking</a> and <a href="https://mpetroff.net/2019/06/preliminary-color-cycle-order-ranking-results/">order ranking</a> posts for details), but there are now ~50% more responses, which has helped with training stability and has reduced uncertainty between different models in the network ensemble. The figure below shows the fifteen lowest ranked six-color color sets on the left and the fifteen highest ranked six-color color sets on the right.</p>
<p><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2020/01/ranked-color-sets-6.svg" alt="Six-Color Ranked Color Sets Visualization" /><span id="more-3171"></span></p>
<p>The accuracy for both the training and tests sets remained at 58%. The plot below shows the average six-color color set scores as a function of rank, with a 1-sigma error band.</p>
<p><iframe loading="lazy" style="border-style:none" src="https://cdn0.mpetroff.net/wp-content/uploads/2020/01/color-set-ranking-6.html" width="100%" height="400px"></iframe></p>
<p>Using the highest-ranked six-color set, the figure below shows the fifteen lowest ranked orderings on the left and the fifteen highest ranked orderings on the right.</p>
<p><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2020/01/ranked-color-cycles-6.svg" alt="Six-Color Ranked Color Cycles Visualization" /></p>
<p>Accuracy was similar to before, with an accuracy of 55% on the training set and an accuracy of 54% on the test set. The plot below shows the average ordering scores as a function or rank, with a 1-sigma error band.</p>
<p><iframe loading="lazy" style="border-style:none" src="https://cdn0.mpetroff.net/wp-content/uploads/2020/01/color-cycle-ranking-6.html" width="100%" height="400px"></iframe></p>
<p>Next, the same technique was extended to the eight-color color sets. The figure below shows the fifteen lowest ranked eight-color color sets on the left and the fifteen highest ranked eight-color color sets on the right.</p>
<p><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2020/01/ranked-color-sets-8.svg" alt="Eight-Color Ranked Color Sets Visualization" /></p>
<p>The accuracy was 57% for both the training and test sets. The plot below shows the average eight-color color set scores as a function of rank, with a 1-sigma error band.</p>
<p><iframe loading="lazy" style="border-style:none" src="https://cdn0.mpetroff.net/wp-content/uploads/2020/01/color-set-ranking-8.html" width="100%" height="400px"></iframe></p>
<p>Using the highest-ranked eight-color set, the figure below shows the fifteen lowest ranked orderings on the left and the fifteen highest ranked orderings on the right.</p>
<p><img decoding="async" src="https://cdn0.mpetroff.net/wp-content/uploads/2020/01/ranked-color-cycles-8.svg" alt="Eight-Color Ranked Color Cycles Visualization" /></p>
<p>The accuracy was 55% on the training set and 53% on the test set. The plot below shows the average ordering scores as a function or rank, with a 1-sigma error band.</p>
<p><iframe loading="lazy" style="border-style:none" src="https://cdn0.mpetroff.net/wp-content/uploads/2020/01/color-cycle-ranking-8.html" width="100%" height="400px"></iframe></p>
<p>This is an incremental improvement over the previous results, as it just used extra data, while keeping the analysis procedure the same. The fact that accuracy was similar when the analysis was extended to eight-color color sets and color cycles is promising. I&#8217;d like to devise a method that combines both the six-color and eight-color color sets in the training process to maximize the use of the response data; I have a few ideas on how to do this but nothing concrete yet. I&#8217;ve also looked more into the idea of devising a color namability criterion by reanalyzing the <a href="https://blog.xkcd.com/2010/05/03/color-survey-results/">xkcd Color Survey</a> results. While my reanalysis has led to some interesting tidbits about color names, it didn&#8217;t really pan out as far as becoming a useful criterion for ranking the color sets at hand. I&#8217;ve been trying to clarify the licensing on the raw xkcd Color Survey responses database dump before writing up my findings, but so far, I have not received a reply from Randall Munroe (which is understandable). As always, more responses would be helpful. I had not originally intended for the survey to go on as long as it has, but as I&#8217;ve been busy with my normal (cosmology-related) research and as I&#8217;ve not received as many responses as I had hoped for, the survey remains open to responses. I plan on leaving it open until the analysis is close to final (at least a few more months), after which I&#8217;ll close the survey to responses and execute the final analysis runs.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mpetroff.net/2020/01/color-cycle-survey-update/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Figure Caption Color Indicators</title>
		<link>https://mpetroff.net/2019/11/figure-caption-color-indicators/</link>
					<comments>https://mpetroff.net/2019/11/figure-caption-color-indicators/#respond</comments>
		
		<dc:creator><![CDATA[Matthew Petroff]]></dc:creator>
		<pubDate>Sat, 23 Nov 2019 18:36:42 +0000</pubDate>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[annotations]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[color blindness]]></category>
		<category><![CDATA[color vision deficiency]]></category>
		<category><![CDATA[figure captions]]></category>
		<category><![CDATA[scientific literature]]></category>
		<guid isPermaLink="false">https://mpetroff.net/?p=3032</guid>

					<description><![CDATA[Earlier this year, I became aware of a feature in GitHub-flavored Markdown that displays a colored square inline when HTML color codes are surrounded by backticks, e.g., #1f77b4. Although I only recently became aware of this feature, it dates back &#8230; <a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<style>
.fccip-color-underline {
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-thickness: 0.2em;
  text-decoration-skip-ink: auto;
}
.fccip-red {
  text-decoration-color: #d62728;
}
.fccip-red-square::after {
  content: "\202f\25a0";
  position: relative;
  display: inline-block;
  color: #d62728;
}
.fccip-blue {
  text-decoration-color: #1f77b4;
}
.fccip-blue-gray {
  text-decoration-color: #6a6a6a;
}
.fccip-blue-square::after {
  content: "\202f\25a0";
  position: relative;
  display: inline-block;
  color: #1f77b4;
}
.fccip-blue-gray-square::after {
  content: "\202f\25a0";
  position: relative;
  display: inline-block;
  color: #6a6a6a;
}
.fccip-blue-square-mono::after {
  content: "\25a0";
  position: relative;
  display: inline-block;
  color: #1f77b4;
  margin-left: 0.2rem;
  top: -0.08rem;
}
.fccip-blue-diamond::after {
  content: "\25c6";
  font-size: 0.85rem;
  position: relative;
  top: -0.05rem;
  display: inline-block;
  color: #1f77b4;
}
.fccip-orange {
  text-decoration-color: #ff7f0e;
}
.fccip-orange-gray {
  text-decoration-color: #878787;
}
.fccip-orange-square::after {
  content: "\202f\25a0";
  position: relative;
  display: inline-block;
  color: #ff7f0e;
}
.fccip-orange-gray-square::after {
  content: "\202f\25a0";
  position: relative;
  display: inline-block;
  color: #878787;
}
.fccip-orange-circle::after {
  content: "\25cf";
  font-size: 1.2rem;
  position: relative;
  display: inline-block;
  color: #ff7f0e;
}
.fccip-gray {
  text-decoration-color: #ccc;
}
.fccip-gray-square::after {
  content: "\202f\25a0";
  position: relative;
  display: inline-block;
  color: #ccc;
}
.fccip-dotted {
  text-decoration-style: dotted;
}
.fccip-caption {
  margin-left: 3em;
  margin-right: 3em;
  padding: 0.5em 0;
  border-top: 1px solid #aaa;
  border-bottom: 1px solid #aaa;
}
</style>
<p><span class="dropcap">E</span>arlier this year, I became aware of a feature in GitHub-flavored Markdown that displays a colored square inline when HTML color codes are surrounded by backticks, e.g., <code><span class="fccip-blue fccip-blue-square-mono">#1f77b4</span></code>. Although I only recently became aware of this feature, it dates back to <a href="https://twitter.com/tomschenkjr/status/855237672692051969">at least 2017</a> and is similar to a feature that Slack has had since <a href="https://twitter.com/rominadesigner/status/494868609718419457">at least 2014</a>. When I saw this inline color presentation, I immediately thought of its applicability to figure captions, particularly in academic papers; as a colorblind individual, matching colors referenced in figure captions to features in the figures themselves can be challenging at times due to difficulties with naming colors. Thus, I added similar annotations to figure captions in my recently submitted paper, <em><a href="https://ui.adsabs.harvard.edu/abs/2019arXiv191101016P">Two-year Cosmology Large Angular Scale Surveyor (CLASS) Observations: A First Detection of Atmospheric Circular Polarization at Q Band</a></em>:</p>
<p class="fccip-caption">
<b>Fig. 2.</b> Frequency dependence of polarized atmospheric signal at zenith for the CLASS observing site, both for circular polarization (<img src='https://s0.wp.com/latex.php?latex=%7CV%7C&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='|V|' title='|V|' class='latex' />, shown in <span class="fccip-color-underline fccip-blue fccip-blue-square">blue</span>) and linear polarization (<img src='https://s0.wp.com/latex.php?latex=%5Csqrt%7BQ%5E2%2BU%5E2%7D&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\sqrt{Q^2+U^2}' title='\sqrt{Q^2+U^2}' class='latex' />, shown in <span class="fccip-color-underline fccip-orange fccip-orange-square">orange</span>). The <span class="fccip-color-underline fccip-gray fccip-gray-square">light gray</span> bands indicate CLASS observing frequencies, with the lowest frequency band corresponding to the Q-band telescope.
</p>
<p class="fccip-caption">
<b>Fig. 5.</b> Example binned azimuth profiles are shown&#8230;angle cut. The profile in <span class="fccip-color-underline fccip-blue fccip-blue-square">blue</span> is from a zenith angle of 43.9&deg; and a boresight rotation angle of &minus;45&deg;, the profile in <span class="fccip-color-underline fccip-orange fccip-orange-square">orange</span> is from a zenith angle of 46.7&deg; and a boresight rotation angle of 0&deg;, and the profile in <span class="fccip-color-underline fccip-red fccip-red-square">red</span> is from a zenith angle of 52.8&deg; and a boresight rotation angle of +45&deg;.
</p>
<p>The first caption refers to a line plot, while the second caption refers to a scatter plot with best fit lines. These examples, as well as underlining examples elsewhere in this post, display best in a browser that supports changing the underline thickness via the <code>text-decoration-thickness</code> CSS property. At the time of writing, this includes Firefox 70+ and Safari 12.2+ but does not include any version of Chrome; however, browser underlining support is still subpar to the underline rendered by <img src='https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\LaTeX' title='\LaTeX' class='latex' />, so the reader is encouraged to view the figures <a href="https://arxiv.org/pdf/1911.01016.pdf">in the paper</a>.<span id="more-3032"></span></p>
<p>While the primary purpose of these annotations is to improve accessibility for individuals with color vision deficiencies, they are also helpful when a paper is printed or displayed in grayscale. For example, it is much easier to distinguish <span class="fccip-color-underline fccip-blue-gray fccip-blue-gray-square">blue</span> and <span class="fccip-color-underline fccip-orange-gray fccip-orange-gray-square">orange</span> in grayscale with the annotations than without.</p>
<p>As this was an experiment, I included two different methods for visualizing the color, a thick colored underline under and a colored square following the color name. Since the colors are referring to solid lines in the plot, the underlines make sense because they match the plot features, e.g., a <span class="fccip-color-underline fccip-blue">solid blue line</span>. Likewise, a dotted underline might make sense for a <span class="fccip-color-underline fccip-blue fccip-dotted">dotted blue line</span>, although it is more difficult to discern the color of the dotted line than the solid line. I am undecided as to whether or not including the colored square is a good idea. While it adds an additional visual cue, the main reason I included it was to increase the chances of at least one of the indicators making it past the editors and into the final published paper; as the paper is currently under review, it remains to be seen if either indicator survives the publication process.</p>
<p>For scatter plots, however, colored shapes make perfect sense. A scatter plot with red squares (<span class="fccip-red-square"></span>), blue diamonds (<span class="fccip-blue-diamond"></span>), and orange circles (<span class="fccip-orange-circle"></span>) should include such shapes in the figure caption when the caption refers to the corresponding points. I am undecided as to whether or not the color names in such cases should be underlined, just as I am undecided as to whether or not line plots should included a colored square. Although I have not seen any color indicators, for either lines or scatter points, in the scientific literature, the use of shapes in figure captions is not a new practice. I have found examples dating from the mid-1950s through the early 2000s. The closest example I have found is in a 1997 paper<sup id="rf1-3032"><a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#fn1-3032" title=" Cadot, O., Y. Couder, A. Daerr, S. Douady, and A. Tsinober. &#8220;Energy injection in closed turbulent flows: Stirring through boundary layers versus inertial stirring.&#8221; &lt;em&gt;Physical Review E&lt;/em&gt; 56, no. 1 (1997): 427. doi:&lt;a href=&quot;https://doi.org/10.1103/PhysRevE.56.427&quot;&gt;10.1103/PhysRevE.56.427&lt;/a&gt; " rel="footnote">1</a></sup> that refers to a symbol with both its name and a graphical representation:</p>
<p class="fccip-caption">
<b>Fig. 5.</b> Couette-Taylor experiments. Logarithmic&#8230;number. The black triangles (&#x25b2;) are the results obtained with smooth cylinders, and the open ones (&#x25b3;) correspond to those obtained with the ribbed ones. The crosses (&times;) show for comparison&#8230;and Swinney [8].
</p>
<p>Other examples include a 1967 paper<sup id="rf2-3032"><a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#fn2-3032" title=" Haque, Khorshed Banu, and J. G. Valatin. &#8220;An investigation of the separation energies of lighter nuclei.&#8221; &lt;em&gt;Nuclear Physics A&lt;/em&gt; 95, no. 1 (1967): 97-114. doi:&lt;a href=&quot;https://doi.org/10.1016/0375-9474(67)90154-6&quot;&gt;10.1016/0375-9474(67)90154-6&lt;/a&gt; " rel="footnote">2</a></sup> (and a 1968 paper<sup id="rf3-3032"><a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#fn3-3032" title=" Aydin, C. &#8220;The spectral variations of CU Virginis (HD 124224).&#8221; &lt;em&gt;Memorie della Societa Astronomica Italiana&lt;/em&gt; 39 (1968): 721. bibcode:&lt;a href=&quot;https://ui.adsabs.harvard.edu/abs/1968MmSAI..39..721A&quot;&gt;1968MmSAI..39..721A&lt;/a&gt; " rel="footnote">3</a></sup>) that uses graphical representations inline instead of symbol names:</p>
<p class="fccip-caption">
<b>Fig. 13.</b> Additional&#8230;symmetries. Points marked with &#x25a0; are the excess&#8230;nuclei, points marked with &#x25a1; the excess&#8230;<i>N = Z</i>. The points &#x25bc; show the differences&#8230;larger <i>Z</i>-values. The points &#x25b3; are the differences&#8230;for even-<i>Z</i>&ndash;odd-<i>N</i> nuclei.
</p>
<p>and a 1955 paper<sup id="rf4-3032"><a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#fn4-3032" title=" Blosser, H. G., and T. H. Handley. &#8220;Survey of (&lt;em&gt;p&lt;/em&gt;, &lt;em&gt;n&lt;/em&gt;) reactions at 12 MeV.&#8221; &lt;em&gt;Physical Review&lt;/em&gt; 100, no. 5 (1955): 1340. doi:&lt;a href=&quot;https://doi.org/10.1103/PhysRev.100.1340&quot;&gt;10.1103/PhysRev.100.1340&lt;/a&gt; " rel="footnote">4</a></sup> that puts the figure legend inline in the figure caption:</p>
<p class="fccip-caption">
<b>Fig. 1.</b> (<i>p</i>,<i>n</i>) cross sections in millibarns. &#x25cb;&mdash;measured total&#8230;isotope; &#x25a1;&mdash;partial&#8230;isotope; &times;&mdash;observed&#8230;estimate. Curves&#8230;of <i>r</i><sub>0</sub>. The dotted bands indicate&#8230;energy.
</p>
<p>There are other examples, e.g., this 1960 paper,<sup id="rf5-3032"><a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#fn5-3032" title=" Evans, D. S., G. V. Raynor, and R. T. Weiner. &#8220;The lattice spacings of thorium-lanthanum alloys.&#8221; &lt;em&gt;Journal of Nuclear Materials&lt;/em&gt; 2, no. 2 (1960): 121-128. doi:&lt;a href=&quot;https://doi.org/10.1016/0022-3115(60)90039-8&quot;&gt;10.1016/0022-3115(60)90039-8&lt;/a&gt; " rel="footnote">5</a></sup> that put the legend on separate lines at the end of the caption, but doing so isn&#8217;t really the same idea. There are also papers that treated line styles in the same manner as scatter plot symbols, such as this 1962 paper:<sup id="rf6-3032"><a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#fn6-3032" title=" Vernov, S. N., E. V. Gorchakov, Yu I. Logachev, V. E. Nesterov, N. F. Pisarenko, I. A. Savenko, A. E. Chudakov, and P. I. Shavrin. &#8220;Investigations of radiation during flights of satellites, space vehicles and rockets.&#8221; &lt;em&gt;Journal of the Physical Society of Japan Supplement&lt;/em&gt; 17 (1962): 162. bibcode:&lt;a href=&quot;https://ui.adsabs.harvard.edu/abs/1962JPSJS..17B.162V&quot;&gt;1962JPSJS..17B.162V&lt;/a&gt; " rel="footnote">6</a></sup></p>
<p class="fccip-caption">
<b>Fig. 1.</b> Counting rate&#8230;in pulses per cm<sup>2</sup> sec. Maximum&#8230;is indicated by broken lines (&ndash; &ndash; &ndash;). The zone&#8230;has been shaded.
</p>
<p>These examples should not be considered by any means exhaustive, since searching for this sort of thing is extremely difficult.<sup id="rf7-3032"><a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#fn7-3032" title=" I found most of the above examples by performing full-text searches in &lt;a href=&quot;https://ui.adsabs.harvard.edu/&quot;&gt;NASA ADS&lt;/a&gt; for terms such as &#8220;black diamond&#8221; or &#8220;filled square&#8221; and looking through hundreds of results to find the few instances that included both the search terms and the symbols. " rel="footnote">7</a></sup> In particular, while I don&#8217;t know of any prior publications that include color indicators, this does not mean that they do not exist. If anyone reading this is aware of any such examples, or of other interesting figure caption indicators, please let me know.</p>
<p>Adoption of visual color indicators such as the ones presented here would be a significant accessibility improvement, but it would require buy-in from both publishers and authors. The chances of success are unclear but would certainly be improved with advocacy.</p>
<hr>
<h3>Implementation</h3>
<p>The <img src='https://s0.wp.com/latex.php?latex=%5CLaTeX&#038;bg=ffffff&#038;fg=000000&#038;s=0' alt='\LaTeX' title='\LaTeX' class='latex' /> color annotation command was defined as</p>
<div class="highlighted-source default tex">
<pre><span></span><span class="c">% Black square</span>
<span class="k">\usepackage</span><span class="nb">{</span>amsmath<span class="nb">}</span>

<span class="c">% Define color</span>
<span class="k">\usepackage</span><span class="nb">{</span>xcolor<span class="nb">}</span>
<span class="k">\definecolor</span><span class="nb">{</span>tab:blue<span class="nb">}{</span>RGB<span class="nb">}{</span>31, 119, 180<span class="nb">}</span>

<span class="c">% Color underlines with breaks for descenders, based on:</span>
<span class="c">% https://tex.stackexchange.com/a/75406</span>
<span class="c">% https://tex.stackexchange.com/a/24771</span>
<span class="c">% https://tex.stackexchange.com/a/321235</span>
<span class="k">\usepackage</span><span class="nb">{</span>soul<span class="nb">}</span>
<span class="k">\usepackage</span><span class="na">[outline]</span><span class="nb">{</span>contour<span class="nb">}</span>
<span class="k">\newcommand</span> <span class="k">\colorindicator</span><span class="na">[2]</span><span class="nb">{</span><span class="c">%</span>
  <span class="k">\begingroup</span><span class="c">%</span>
  <span class="k">\setul</span><span class="nb">{</span>0.25ex<span class="nb">}{</span>0.4ex<span class="nb">}</span><span class="c">%</span>
  <span class="k">\contourlength</span><span class="nb">{</span>0.2ex<span class="nb">}</span><span class="c">%</span>
  <span class="k">\setulcolor</span><span class="nb">{</span>#1<span class="nb">}</span><span class="c">%</span>
  <span class="k">\ul</span><span class="nb">{{</span><span class="k">\phantom</span><span class="nb">{</span>#2<span class="nb">}}}</span><span class="k">\llap</span><span class="nb">{</span><span class="k">\contour</span><span class="nb">{</span>white<span class="nb">}{</span>#2<span class="nb">}}</span> <span class="k">\textcolor</span><span class="nb">{</span>#1<span class="nb">}{</span><span class="k">\tiny</span><span class="nb">{</span><span class="s">$</span><span class="nv">\blacksquare</span><span class="s">$</span><span class="nb">}}</span><span class="c">%</span>
  <span class="k">\endgroup</span><span class="c">%</span>
<span class="nb">}</span>
</pre>
</div>
<p>and used with <code>\colorindicator{tab:blue}{blue}</code>. For HTML, this CSS</p>
<div class="highlighted-source default css">
<pre><span></span><span class="p">.</span><span class="nc">color-underline</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="k">text-decoration-line</span><span class="p">:</span><span class="w"> </span><span class="kc">underline</span><span class="p">;</span><span class="w"></span>
<span class="w">  </span><span class="k">text-decoration-style</span><span class="p">:</span><span class="w"> </span><span class="kc">solid</span><span class="p">;</span><span class="w"></span>
<span class="w">  </span><span class="n">text-decoration-thickness</span><span class="p">:</span><span class="w"> </span><span class="mf">0.2</span><span class="kt">em</span><span class="p">;</span><span class="w"></span>
<span class="w">  </span><span class="n">text-decoration-skip-ink</span><span class="p">:</span><span class="w"> </span><span class="kc">auto</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="p">.</span><span class="nc">blue</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="k">text-decoration-color</span><span class="p">:</span><span class="w"> </span><span class="mh">#1f77b4</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
<span class="p">.</span><span class="nc">blue-square</span><span class="p">::</span><span class="nd">after</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="k">content</span><span class="p">:</span><span class="w"> </span><span class="s2">&quot;\202f\25a0&quot;</span><span class="p">;</span><span class="w"></span>
<span class="w">  </span><span class="k">position</span><span class="p">:</span><span class="w"> </span><span class="kc">relative</span><span class="p">;</span><span class="w"></span>
<span class="w">  </span><span class="k">display</span><span class="p">:</span><span class="w"> </span><span class="kc">inline-block</span><span class="p">;</span><span class="w"></span>
<span class="w">  </span><span class="k">color</span><span class="p">:</span><span class="w"> </span><span class="mh">#1f77b4</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre>
</div>
<p>was used with <code>&lt;span class="color-underline blue blue-square"&gt;blue&lt;/span&gt;</code> to produce <span class="fccip-color-underline fccip-blue fccip-blue-square">blue</span>. A production implementation would probably involve a symbol web font to improve and normalize the symbol appearance and possibly a better way to draw underlines.</p>
<p>Update (2020-10-31): <a href="https://mpetroff.net/2020/10/update-on-figure-caption-color-indicators/">see update on search for existing examples</a></p>
<hr class="footnotes"><ol class="footnotes" style="list-style-type:decimal"><li id="fn1-3032"><p > Cadot, O., Y. Couder, A. Daerr, S. Douady, and A. Tsinober. &#8220;Energy injection in closed turbulent flows: Stirring through boundary layers versus inertial stirring.&#8221; <em>Physical Review E</em> 56, no. 1 (1997): 427. doi:<a href="https://doi.org/10.1103/PhysRevE.56.427">10.1103/PhysRevE.56.427</a> &nbsp;<a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#rf1-3032" class="backlink" title="Return to footnote 1.">&#8617;</a></p></li><li id="fn2-3032"><p > Haque, Khorshed Banu, and J. G. Valatin. &#8220;An investigation of the separation energies of lighter nuclei.&#8221; <em>Nuclear Physics A</em> 95, no. 1 (1967): 97-114. doi:<a href="https://doi.org/10.1016/0375-9474(67)90154-6">10.1016/0375-9474(67)90154-6</a> &nbsp;<a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#rf2-3032" class="backlink" title="Return to footnote 2.">&#8617;</a></p></li><li id="fn3-3032"><p > Aydin, C. &#8220;The spectral variations of CU Virginis (HD 124224).&#8221; <em>Memorie della Societa Astronomica Italiana</em> 39 (1968): 721. bibcode:<a href="https://ui.adsabs.harvard.edu/abs/1968MmSAI..39..721A">1968MmSAI..39..721A</a> &nbsp;<a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#rf3-3032" class="backlink" title="Return to footnote 3.">&#8617;</a></p></li><li id="fn4-3032"><p > Blosser, H. G., and T. H. Handley. &#8220;Survey of (<em>p</em>, <em>n</em>) reactions at 12 MeV.&#8221; <em>Physical Review</em> 100, no. 5 (1955): 1340. doi:<a href="https://doi.org/10.1103/PhysRev.100.1340">10.1103/PhysRev.100.1340</a> &nbsp;<a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#rf4-3032" class="backlink" title="Return to footnote 4.">&#8617;</a></p></li><li id="fn5-3032"><p > Evans, D. S., G. V. Raynor, and R. T. Weiner. &#8220;The lattice spacings of thorium-lanthanum alloys.&#8221; <em>Journal of Nuclear Materials</em> 2, no. 2 (1960): 121-128. doi:<a href="https://doi.org/10.1016/0022-3115(60)90039-8">10.1016/0022-3115(60)90039-8</a> &nbsp;<a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#rf5-3032" class="backlink" title="Return to footnote 5.">&#8617;</a></p></li><li id="fn6-3032"><p > Vernov, S. N., E. V. Gorchakov, Yu I. Logachev, V. E. Nesterov, N. F. Pisarenko, I. A. Savenko, A. E. Chudakov, and P. I. Shavrin. &#8220;Investigations of radiation during flights of satellites, space vehicles and rockets.&#8221; <em>Journal of the Physical Society of Japan Supplement</em> 17 (1962): 162. bibcode:<a href="https://ui.adsabs.harvard.edu/abs/1962JPSJS..17B.162V">1962JPSJS..17B.162V</a> &nbsp;<a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#rf6-3032" class="backlink" title="Return to footnote 6.">&#8617;</a></p></li><li id="fn7-3032"><p > I found most of the above examples by performing full-text searches in <a href="https://ui.adsabs.harvard.edu/">NASA ADS</a> for terms such as &#8220;black diamond&#8221; or &#8220;filled square&#8221; and looking through hundreds of results to find the few instances that included both the search terms and the symbols. &nbsp;<a href="https://mpetroff.net/2019/11/figure-caption-color-indicators/#rf7-3032" class="backlink" title="Return to footnote 7.">&#8617;</a></p></li></ol>]]></content:encoded>
					
					<wfw:commentRss>https://mpetroff.net/2019/11/figure-caption-color-indicators/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<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-30 09:44:24 by W3 Total Cache
-->