class: left, middle, inverse, title-slide # .large[The use of colour in graphics] ## .large[A journey through the body & mind to the screen] ###
Nicholas Tierney, Monash University
###
Monash Data Fluency, June 26
bit.ly/njt-monash-colour
nj_tierney
--- layout: true <div class="my-footer"><span>bit.ly/njt-monash-colour • @nj_tierney</span></div> --- # Your turn: What makes this graphic good, and bad? <img src="imgs/bom-heat-map.png" width="418" style="display: block; margin: auto;" /> --- # BoM 😢 <img src="figures/map-bom-1.png" width="936" style="display: block; margin: auto;" /> --- # Viridis 😄 <img src="figures/map-viridis-1.png" width="936" style="display: block; margin: auto;" /> --- # Jet? <img src="figures/map-jet-1.png" width="936" style="display: block; margin: auto;" /> ??? Sometimes the conversation ends there, and you provide them a few graphics that look better. Like this. --- # How do we describe what is better/worse about them? <img src="figures/both-maps-1.png" width="936" style="display: block; margin: auto;" /> --- # Describing why and how one is better .left-code[ <img src="imgs/bom-heat-map.png" width="418" style="display: block; margin: auto;" /> ] .right-plot[ - Vocabulary to describe **why** - Not just: "It's not colourblind safe", "The colours are wrong" "Type of colourscale is wrong". - I want to explain the other perceptual properties ] ??? I guess the other parts of my motivation for this talk come from seeing a lot of people using bad/sub optimal colourscales. There is great tooling in R to do the following: --- # We're going in for a deep dive here, folks <img src="https://gifs.njtierney.com/whistling-deep-dive.gif" style="display: block; margin: auto;" /> --- # Goals of this talk - What is colour? - How do we perceive colour? - What is colourblindness? - What is a vocabulary around colour? - How do I use colour in my plot? - How do I assess colour? - How do I create new colour palettes? ??? This made sense to me, I know what colourblindness is, and I know what perceptually uniform means. But I also have an honours degree in Psychological Science. My honours project studied the human visual system, in an area called psychophysics. I didn’t study colour, but we did need to learn about the visual system in neuropsychology. # What is colour? -- Disclaimer: This is a _brief_ introduction into a **complex** topic This next section is inspired by [Calder Hansen's ](https://www.youtube.com/channel/UC7zwxzcgdrjnFkRrLnfN_CA) [The Science of Color Perception](https://www.youtube.com/watch?v=poL7nDmqjmk) --- # Colour: Waves of light, perceived. Just as there are soundwaves that you can hear 🔉 👂 There are lightwaves that we see 🚥 👀 ??? This combines physics, biology, and a bit of philosophy. --- # Physics of Colour These lightwaves come in different shapes - different wavelengths: <img src="imgs/wave-sml-trim.png" width="60%" style="display: block; margin: auto;" /> --- # The visible spectrum <img src="figures/show-spectra-1.png" width="936" style="display: block; margin: auto;" /> ??? - At this end we have the longest wavelengths - At this end we have the shortest wavelengths --- # Physics of Colour (More than we can see) <img src="imgs/em-spectrum.svg" width="80%" style="display: block; margin: auto;" /> > From https://commons.wikimedia.org/wiki/File:EM_spectrum.svg <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>. ??? - Note that this is just a tiny slice of the light spectrum - We just happen to be able to see this range of colours - But How? --- # Physics of Colour <img src="imgs/eye-cones-trim.png" width="60%" style="display: block; margin: auto;" /> ??? - Lightwaves enter our eyes, and we have the perception of colour. - Shorter wavelengths = "purple" / "blue - longer wavelengths = "red" - As light enters the eye, it hits cells that are sensitive to light. - These cells are called rods and cones. - The cones are the bits that allow us to see colour --- # Biology of colour: cones <img src="imgs/cone-family-trim.png" width="60%" style="display: block; margin: auto;" /> ??? - If we get only one type of colour entering in the eye, we get one colour. - This is because of these three cones: - Colours are brighter when there is more of the light - most colours are a combination of multiple wave lengths --- # Biology of colour: cone sensitivty to light <img src="figures/cone-sensitivity-1.png" width="936" style="display: block; margin: auto;" /> .small[Image inspired by [figure of responsivity of human eye from Wikipedia](https://en.wikipedia.org/wiki/File:Cone-fundamentals-with-srgb-spectrum.svg), data extracted from [Colour & Vision Research laboratory at UCL's](http://cvrl.ucl.ac.uk) section on [cones](http://cvrl.ucl.ac.uk/cones.htm).] --- # How do we see colour? Blue? <img src="imgs/perception-trim.png" width="60%" style="display: block; margin: auto;" /> ??? So what happens when we are exposed to a lot of these longer wavelengths of "red" light? - Long cones react - Medium cones not so much - S cones not at all That information is then taken in to your brain and then you have the sensation of "red". --- # But I don't just see red and green and blue? Well, kinda? <img src="figures/rgb-spec-1.png" width="936" style="display: block; margin: auto;" /> --- # But I don't just see red and green and blue? Well, kinda? <img src="figures/rgb-spec-extra-again-1.png" width="936" style="display: block; margin: auto;" /> ??? - Colour is made up of the _combination_ of light entering our eye. - Red could be some of ..., and some of ... - Orange could be - White could be all colours, or it could just be There are actually many different combinations of light waves that can get us to see different colours. This means that colour is not just a single light waves, or a combination of many, but it is our perception of light --- # Colourblindness - What happens if someone doesn't have some of these cones? - Or one of the cones isn't as responsive? - This is what we call **colourblindness** and **colourweakness** - Depending on which cones are missing, this means some sets of colours are indistinguishable from one another. - It affects up to 10% of males of European descent, and 1 in 200 women. --- # Full colour vision <img src="figures/full-colour-1.png" width="936" style="display: block; margin: auto;" /> --- # No L cone = Protonopia (Less "red") <img src="figures/show-colour-response-no-s-1.png" width="936" style="display: block; margin: auto;" /> --- # No M cone = Deutanopia (Less "green") <img src="figures/show-colour-response-no-m-1.png" width="936" style="display: block; margin: auto;" /> --- # No S cone = Tritanopia (Less "Blue") <img src="figures/show-colour-response-no-l-1.png" width="936" style="display: block; margin: auto;" /> --- # Colourblindness impacts everyday design Without those cones, some colours look the same -- This is why traffic lights have position markings, instead of just the same position changing colour. --- # Normal Traffic Light <img src="figures/traffic-normal-1.png" width="122" style="display: block; margin: auto;" /> --- # Traffic Light (Protan) <img src="figures/traffic-protan-1.png" width="122" style="display: block; margin: auto;" /> --- # Traffic Light (Deutan) <img src="figures/traffic-deutan-1.png" width="122" style="display: block; margin: auto;" /> --- # Traffic Light (Tritan) <img src="figures/traffic-tritan-1.png" width="122" style="display: block; margin: auto;" /> --- # Some of these colours look very similar! <img src="figures/traffic-cones-all-1.png" width="489" style="display: block; margin: auto;" /> ??? _gif of good traffic light for different vision_ vs _gif of bad traffic light with different vision_ --- # Colourblindness key points - We perceive colour using the cones in our eyes - Some people don't have certain cones, or reduced capacity in those - This means some colours cannot be distinguished by those with colourblindness - We need to be careful how we present colour, and what colours we present. --- # Tools for testing how well your plot stands up to colourblindness? - We can transform colours into approximations of colourblindness - Many tools exist for exploring colourblindness - We'll mostly be exploring the R package, `colorspace` --- # Tools for testing how well your plot stands up to colourblindness? - `colorspace`: `protan()`, `deutan()`, `tritan()` transform colours. ```r # Just rainbow rainbow(5) ``` ``` ## [1] "#FF0000" "#CCFF00" "#00FF66" "#0066FF" "#CC00FF" ``` ```r # Rainbow into protan rainbow(5) %>% protan() ``` ``` ## [1] "#261D00" "#FFDF00" "#F7D25F" "#3769FF" "#0030FF" ``` --- # How to test how well your plot stands up to colourblindness? ```r rainbow(19) %>% protan() %>% swatchplot() ``` <img src="figures/show-protan-swatch-1.png" width="936" style="display: block; margin: auto;" /> --- # How to test how well your plot stands up to colourblindness? .left-code[ The `prismatic` package provides `check_color_blindness`: ```r rainbow(19) %>% check_color_blindness() ``` ] .right-plot[ <img src="figures/prismatic-check-out-1.png" width="100%" style="display: block; margin: auto;" /> ] --- # What if your plot is an image already? - `colorspace` provides a "Colour Vision Deficiency (CVD) Emulator" - `cvd_emulator`. - This takes in a JPG / PNG - Let's explore what this original image from BoM looks like: ```r cvd_emulator("imgs/bom-heat-map.png") ``` --- # Original image <img src="imgs/bom-heat-map.png" width="60%" style="display: block; margin: auto;" /> --- # Protan image (No Red Cone) <img src="imgs/protan_bom-heat-map.png" width="60%" style="display: block; margin: auto;" /> --- # Deutan image (No Green Cone) <img src="imgs/deutan_bom-heat-map.png" width="60%" style="display: block; margin: auto;" /> --- # Tritan image (No Blue Cone) <img src="imgs/tritan_bom-heat-map.png" width="60%" style="display: block; margin: auto;" /> --- # Greyscale image <img src="imgs/desaturate_bom-heat-map.png" width="60%" style="display: block; margin: auto;" /> - What is a vocabulary around colour? - How do I assess colour? - How do I create new colour palettes? --- # Describing colour in graphics .pull-left[ <img src="imgs/desaturate_bom-heat-map.png" width="418" style="display: block; margin: auto;" /> ] .pull-right[ - Something about this grayscale plot was interesting - It looped back on itself in places - That was the colour ... saturation? - Colour...brightness? - Colour...depth? ] --- # Describing colour in graphics - There is a wide vocab that we can use to discuss colour. - We can describe any colour using the different values of red, green, and blue. - Remember the red, green, and blue cones? --- # Describing colour in graphics <img src="figures/rgb-spec-extra-1.png" width="936" style="display: block; margin: auto;" /> --- # Describing colour in graphics .pull-left[ <img src="imgs/bom-heat-map.png" width="418" style="display: block; margin: auto;" /> ] .pull-right[ - But in looking at the BoM plot, it doesn't really help us to say: "We need 50% more red, and reduce the intensity of green". - It is hard for us to really imagine and predict without a lot of training - Is there another way to describe the colour? ] --- # Yes: Hue, Chroma, Luminance <img src="figures/show-hcl-1.png" width="80%" style="display: block; margin: auto;" /> ??? These go by other names, and are just one of a set of many different colour representations (HSV, CIELAB, … ), and the literature on colourspace is wide and vast. These allow us to explore and explain colour in a way that makes sense to human. These are human readable ways to describe colour, but ultimately get expressed into terms of RGB. --- # Colorspace .pull-left[ <img src="imgs/colorspace-website.png" width="774" style="display: block; margin: auto;" /> ] .pull-right[ <img src="imgs/colorspace-paper.png" width="575" style="display: block; margin: auto;" /> ] --- # Describing our previous maps in terms of hue, chroma, luminance - Using `colorspace` to explore colour palettes - We can explore some colour palettes using HCL, with the `specplot` function from `colorspace`. - We can take our palette and plot it along these dimensions --- # HCL of BoM plot palette <img src="figures/specplot-bom-standard-pal-1.png" width="936" style="display: block; margin: auto;" /> ??? I have the nice colours used in the Australian heat data here, which we can view with `swatchplot` from `colorspace`, or `show_cols` from `scales` --- # Design decisions when choosing colour .pull-left[ <img src="figures/specplot-bom-standard-pal-again-1.png" width="936" style="display: block; margin: auto;" /> ] .pull-right[ - Colours change hue a lot - Expectation: As temperature increased, other parameters increase? - Expectation: one unit step in the palette produces a constant perceptual change in colour (perceptually uniform). - Doesn't seem to be the case - Wrong type of palette? ] --- # Types of palettes - Qualitative: For coding categorical information, i.e., where no particular ordering of categories is available and every color should receive the same perceptual weight. - Sequential: For coding ordered/numeric information, i.e., where colors go from high to low (or vice versa). - Diverging: Designed for coding numeric information around a central neutral value, i.e., where colors diverge from neutral to two extremes. .small[(From the R help file on colour palettes)] --- # Qualitative: Every colour has same weight <img src="figures/qual-specplot-1.png" width="936" style="display: block; margin: auto;" /> --- # Sequential: Colours go low - high <img src="figures/seq-specplot-1.png" width="936" style="display: block; margin: auto;" /> --- # Sequential: Multiple hues <img src="figures/seq-multi-specplot-1.png" width="936" style="display: block; margin: auto;" /> --- # Diverging: Neutral value to two extremes <img src="figures/div-specplot-1.png" width="936" style="display: block; margin: auto;" /> --- # Improving the BoM plot .pull-left[ <img src="figures/specplot-bom-standard-pal-again-again-1.png" width="936" style="display: block; margin: auto;" /> ] .pull-right[ - Multi hue - Perceptually uniform - Colourblind safe? ] --- # Exploring colourblindness in BoM palettes .pull-left[ BoM <img src="figures/cvd-bom-standard-pal-again-again-1.png" width="936" style="display: block; margin: auto;" /> ] .pull-right[ Viridis <img src="figures/cvd-bom-viridis-pal-again-again-1.png" width="936" style="display: block; margin: auto;" /> ] --- # Improving the BoM plot .pull-left[ <img src="figures/specplot-bom-standard-pal-again-again2-1.png" width="936" style="display: block; margin: auto;" /> ] .pull-right[ <img src="figures/specplot-bom-viridis-pal-again-again2-1.png" width="936" style="display: block; margin: auto;" /> ] --- # Improving the BoM plot .pull-left[ <img src="figures/specplot-bom-viridis-pal-again-again-1.png" width="936" style="display: block; margin: auto;" /> ] .pull-right[ - Multiple hues - Luminance places importance on high/low values ] --- # Creating your own colour palette with `colorspace` 1. Decide what type of palette you want (Sequential, Diverging, etc) 2. Decide what colours you want to go through --- ### `sequential_hcl(n = 20, h = 300)` <img src="figures/sequential-hcl-1.png" width="936" style="display: block; margin: auto;" /> --- # Aside: the hue is a colour wheel <img src="figures/aside-hue-colour-wheel-1.png" width="936" style="display: block; margin: auto;" /> --- ### `sequential_hcl(n = 20, h = c(360, 120))` <img src="figures/unnamed-chunk-1-1.png" width="936" style="display: block; margin: auto;" /> ??? Use `sequential_hcl` and provide two hues --- # Preview colours with `demoplot(type = "map")` <img src="figures/unnamed-chunk-2-1.png" width="936" style="display: block; margin: auto;" /> --- # Preview colours with `demoplot(type = "heatmap")` <img src="figures/unnamed-chunk-3-1.png" width="936" style="display: block; margin: auto;" /> --- # Check colourblindness `protan` and use demoplot <img src="figures/unnamed-chunk-4-1.png" width="936" style="display: block; margin: auto;" /> --- # Check colourblindness `protan` and use demoplot (compare to rainbow) <img src="figures/unnamed-chunk-5-1.png" width="936" style="display: block; margin: auto;" /> --- # Exploring palettes: demo ```r hcl_palettes("qualitative", plot = TRUE) hcl_palettes("sequential", plot = TRUE) hcl_palettes("diverging", plot = TRUE) ``` --- # Tools for exploring colourblindness: - Using the hex/colour codes - Colorspace: `protan`/`deutan`/`tritan` - prismatic: `check_color_blindness` - For a ggplot object - colorblindr: `cvd_grid` - For an image - colorspace: `cvd_emulator` --- # Tools for creating good colours - Colorspace: - `qualitative_hcl` - `sequential_hcl` - `diverging_hcl` - Pick the hue/chroma/luminance you want to travel through --- # A workflow for choosing a colour palette 1. What type of data is it? 2. Decide the colour palette type: - Qualitative: Are the categories equal? - Sequential: Does the value go from low to high? - Diverging: Does it have a natural balance/zero point? 1. Check colourblindness: `check_color_blindness` 1. Explore colour with `specplot` (combine with `protan` and friends) 1. Explore how it looks with `demoplot` (combine with `protan` and friends) --- # Take homes - Colour choice matters - Choosing colours is hard - We can use Hue / Chroma / Luminance to describe colour - See established palettes: colorspace / viridis / scico - Assess colours with `colorspace::specplot()` - Assess colourblindness with `colorspace::cvd_emulator()` - Evaluate your own colour palettes at `hclwizard.com` - Choose colour palettes with - `colorspace::choose_palette()` - `colorspace::choose_color()` - `colorspace::hcl_color_picker()` - `colorspace::hcl_wizard()` --- # Thanks .large.pull-left[ - [Adam Sparks](https://adamhsparks.com/) - [Lisa Charlotte Rost](https://twitter.com/lisacrost) - [Philip Grove](http://researchers.uq.edu.au/researcher/1637) - [Miles McBain](https://milesmcbain.xyz/) ] .large.pull-right[ - [Di Cook](http://dicook.org/) - [Stuart Lee](https://stuartlee.org/) - [Achim Zeileis](https://eeecon.uibk.ac.at/~zeileis/) - [Emil Hvitfeldt](https://www.hvitfeldt.me/about/) ] --- # Resources .large[ - [Colorspace Package by Zeileis et al](http://colorspace.r-forge.r-project.org/index.html) - [Colorspace Paper by Zeileis et al](https://arxiv.org/abs/1903.06490) - [Colorspace talk by Achim Zeileis](https://www.youtube.com/watch?v=6bv2IAcNE_c) - http://hclwizard.org/ website for assessing colour ] --- # Resources .large[ - [How your colorblind and colorweak readers see your colors](https://blog.datawrapper.de/colorblindness-part1/) (Part 1 of 3) by [Lisa Charlotte Rost](https://twitter.com/lisacrost) - [What to consider when visualizing data for colorblind readers](https://blog.datawrapper.de/colorblindness-part2/) (Part 2 of 3) by [Lisa Charlotte Rost](https://twitter.com/lisacrost) - [The Science of Color Perception](https://www.youtube.com/watch?v=poL7nDmqjmk) by [Calder Hanson](https://www.youtube.com/channel/UC7zwxzcgdrjnFkRrLnfN_CA) - [Radiolab episode on colour vision](https://www.wnycstudios.org/podcasts/radiolab/articles/rippin-the-rainbow-an-even-newer-one) ] --- # Colophon .large[ - Slides made using [xaringan](https://github.com/yihui/xaringan) - Extended with [xaringanthemer](https://github.com/gadenbuie/xaringanthemer) - Colours taken + modified from [lorikeet theme from ochRe](https://github.com/ropenscilabs/ochRe) - Header font is **Josefin Sans** - Body text font is **Montserrat** - Code font is **Fira Mono** - template available: [njtierney/njt-talks](github.com/njtierney/njt-talks) ] --- # Learning more .large[ <svg viewBox="0 0 640 512" xmlns="http://www.w3.org/2000/svg" style="height:1em;fill:currentColor;position:relative;display:inline-block;top:.1em;"> <path d="M425.7 256c-16.9 0-32.8-9-41.4-23.4L320 126l-64.2 106.6c-8.7 14.5-24.6 23.5-41.5 23.5-4.5 0-9-.6-13.3-1.9L64 215v178c0 14.7 10 27.5 24.2 31l216.2 54.1c10.2 2.5 20.9 2.5 31 0L551.8 424c14.2-3.6 24.2-16.4 24.2-31V215l-137 39.1c-4.3 1.3-8.8 1.9-13.3 1.9zm212.6-112.2L586.8 41c-3.1-6.2-9.8-9.8-16.7-8.9L320 64l91.7 152.1c3.8 6.3 11.4 9.3 18.5 7.3l197.9-56.5c9.9-2.9 14.7-13.9 10.2-23.1zM53.2 41L1.7 143.8c-4.6 9.2.3 20.2 10.1 23l197.9 56.5c7.1 2 14.7-1 18.5-7.3L320 64 69.8 32.1c-6.9-.8-13.5 2.7-16.6 8.9z"></path></svg> [colorspace by Zeileis et al.](http://colorspace.r-forge.r-project.org/index.html) <svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" style="height:1em;fill:currentColor;position:relative;display:inline-block;top:.1em;"> <path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"></path></svg> [bit.ly/njt-monash-colour](https://bit.ly/njt-monash-colour) <svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" style="height:1em;fill:currentColor;position:relative;display:inline-block;top:.1em;"> <path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path></svg> nj_tierney <svg viewBox="0 0 496 512" xmlns="http://www.w3.org/2000/svg" style="height:1em;fill:currentColor;position:relative;display:inline-block;top:.1em;"> <path d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg> njtierney <svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" style="height:1em;fill:currentColor;position:relative;display:inline-block;top:.1em;"> <path d="M476 3.2L12.5 270.6c-18.1 10.4-15.8 35.6 2.2 43.2L121 358.4l287.3-253.2c5.5-4.9 13.3 2.6 8.6 8.3L176 407v80.5c0 23.6 28.5 32.9 42.5 15.8L282 426l124.6 52.2c14.2 6 30.4-2.9 33-18.2l72-432C515 7.8 493.3-6.8 476 3.2z"></path></svg> nicholas.tierney@gmail.com ] --- .vhuge[ **End.** ] --- # Workflows --- # Explore rainbow palette with specplot: Rainbow + specplot ```r rainbow(n = 20) %>% specplot() ``` <img src="figures/show-rainbow-specplot-1.png" width="60%" style="display: block; margin: auto;" /> --- # Explore rainbow palette with colorblindness specplot: Rainbow + hclplot ```r rainbow(n = 20) %>% hclplot() ``` <img src="figures/show-rainbow-hclplot-1.png" width="60%" style="display: block; margin: auto;" /> --- # Explore rainbow palette with colorblindness specplot: Rainbow + protan + specplot ```r rainbow(n = 20) %>% protan() %>% specplot() ``` <img src="figures/show-rainbow-specplot-protan-1.png" width="60%" style="display: block; margin: auto;" /> --- # Explore rainbow palette with colorblindness specplot: Rainbow + protan + hclplot ```r rainbow(n = 20) %>% protan() %>% hclplot() ``` <img src="figures/show-rainbow-protan-hclplot-1.png" width="60%" style="display: block; margin: auto;" /> --- # Explore palettes with specplot: Rainbow + demoplot ```r rainbow(n = 20) %>% demoplot() ``` <img src="figures/show-rainbow-demoplot-1.png" width="60%" style="display: block; margin: auto;" /> --- # Explore palettes with specplot: Rainbow + protan + demoplot ```r rainbow(n = 20) %>% protan() %>% demoplot() ``` <img src="figures/show-rainbow-protan-demoplot-1.png" width="60%" style="display: block; margin: auto;" /> --- # Compare Rainbow to Viridis: specplot .pull-left[ ```r rainbow(n = 20) %>% specplot() ``` <img src="figures/show-rainbow-viridis-specplot-1-1.png" width="936" style="display: block; margin: auto;" /> ] .pull-right[ ```r pals::viridis(n = 20) %>% specplot() ``` <img src="figures/show-rainbow-viridis-specplot-2-1.png" width="936" style="display: block; margin: auto;" /> ] --- # Compare Rainbow to Viridis: specplot + protan .pull-left[ ```r rainbow(n = 20) %>% protan() %>% specplot() ``` <img src="figures/show-rainbow-viridis-specplot-protan-1-1.png" width="936" style="display: block; margin: auto;" /> ] .pull-right[ ```r pals::viridis(n = 20) %>% protan() %>% specplot() ``` <img src="figures/show-rainbow-viridis-specplot-protan-2-1.png" width="936" style="display: block; margin: auto;" /> ] --- # Compare Rainbow to Viridis: hclplot .pull-left[ ```r rainbow(n = 20) %>% hclplot() ``` <img src="figures/show-rainbow-viridis-hclplot-1-1.png" width="936" style="display: block; margin: auto;" /> ] .pull-right[ ```r pals::viridis(n = 20) %>% hclplot() ``` <img src="figures/show-rainbow-viridis-hclplot-2-1.png" width="936" style="display: block; margin: auto;" /> ] --- # Compare Rainbow to Viridis: hclplot + protan .pull-left[ ```r rainbow(n = 20) %>% protan() %>% hclplot() ``` <img src="figures/show-rainbow-viridis-hclplot-protan-1-1.png" width="936" style="display: block; margin: auto;" /> ] .pull-right[ ```r pals::viridis(n = 20) %>% protan() %>% hclplot() ``` <img src="figures/show-rainbow-viridis-hclplot-protan-2-1.png" width="936" style="display: block; margin: auto;" /> ] --- # Compare Rainbow to Viridis: demoplot .pull-left[ ```r rainbow(n = 20) %>% demoplot() ``` <img src="figures/show-rainbow-viridis-demoplot-1-1.png" width="936" style="display: block; margin: auto;" /> ] .pull-right[ ```r pals::viridis(n = 20) %>% demoplot() ``` <img src="figures/show-rainbow-viridis-demoplot-2-1.png" width="936" style="display: block; margin: auto;" /> ] --- # Compare Rainbow to Viridis: demoplot + protan .pull-left[ ```r rainbow(n = 20) %>% protan() %>% demoplot() ``` <img src="figures/show-rainbow-viridis-demoplot-protan-show-1-1.png" width="936" style="display: block; margin: auto;" /> ] .pull-right[ ```r pals::viridis(n = 20) %>% protan() %>% demoplot() ``` <img src="figures/show-rainbow-viridis-demoplot-protan-show-2-1.png" width="936" style="display: block; margin: auto;" /> ]