Skip to content

  • Home
  • Life Coach
  • Travel Lifestyle
  • Luxury Lifestyle
  • Travel Tips
  • Urban Life
  • More
    • Contact Us
    • Disclaimer
    • Terms and Conditions
    • About Us
    • Privacy Policy
  • Tech
  • Toggle search form
End the rainbow! Oh, wait.

End the rainbow! Oh, wait.

Posted on July 30, 2025 By rehan.rafique No Comments on End the rainbow! Oh, wait.

It’s been a while now since there is a growing understanding that rainbow color
palettes can negatively impact how accurately we perceive and interpret data visualizations.
Rainbow maps have been linked to lower accuracy and are not readable by color-blind readers. This gave rise to the
#EndTheRainbow movement among many scientists across various fields.

Some people might not know this, but a team at Google has come to rescue the
rainbow lovers. A couple of years ago, they created
Turbo, An Improved Rainbow Colormap for Visualization. It seems turbo is distinguishable and smooth for all types of color blindness conditions, except Achromatopsia (total color blindness).

The turbo color palette is now available in R with the viridisLite
package. Here is a quick demonstration:

library(viridisLite)
library(ggplot2)
library(patchwork)
library(dplyr)
library(reshape2)

plot_list <- lapply(X=c('viridis', 'inferno', 'cividis', 'turbo'), 
                   FUN=function(i){
                                   volcano %>% 
                                     melt() %>%
                                     ggplot() +
                                     geom_tile(aes(x = Var1, y = Var2, fill = value)) +
                                     scale_fill_viridis_c(option = i) +
                                     labs(subtitle = paste0(i), fill="") +
                                     #coord_fixed() +
                                     theme_void()
                                     }
                                  )
# patch plots together
plot_list[[1]] +
plot_list[[2]] +
plot_list[[3]] +
plot_list[[4]]

ggsave(filename="turbo_test.png", dpi=200, 
       width = 16, heigh=10, units="cm")

End the rainbow! Oh, wait.

Before we get too excited, even the turbo rainbow palette exaggerates the colors a bit. See below. If your data visualization involves really smooth and detailed transitions, you should probably stick to the #EndTheRainbow movement.

library(imager)

my_photo <- load.image('https://www.urbandemographics.org/img/post_images/urban_picture_rio_lucasmagno.jpg')

# color palettes
p_viridis <- scales::gradient_n_pal(viridisLite::viridis(n=1000))
p_inferno <- scales::gradient_n_pal(viridisLite::inferno(n=1000))
p_turbo <- scales::gradient_n_pal(viridisLite::turbo(n=1000))

# plot
png("turbo_test_rio.png", units="cm", width=14, height=17, res=200)
# insert ggplot code

par(mfrow=c(2,2), mai = c(.05, 0.05, .05, 0.05))

plot(my_photo, axes=FALSE)
grayscale(my_photo) %>% plot(colourscale=p_viridis,rescale=FALSE, axes=FALSE)
grayscale(my_photo) %>% plot(colourscale=p_inferno,rescale=FALSE, axes=FALSE)
grayscale(my_photo) %>% plot(colourscale=p_turbo,rescale=FALSE, axes=FALSE)

dev.off()


Urban Life

Post navigation

Previous Post: Million-Dollar Classic Car Masterpieces
Next Post: How You Can Stomp Grapes in the Douro Valley in Portugal

More Related Articles

Robert Schwandl’s Urban Rail Blog: AMSTERDAM Noord/Zuidlijn Robert Schwandl’s Urban Rail Blog: AMSTERDAM Noord/Zuidlijn Urban Life
Maximizing Your Space: Essentials for Crafting a Vibrant Urban Garden in Compact Areas Maximizing Your Space: Essentials for Crafting a Vibrant Urban Garden in Compact Areas Urban Life
My Community Keeps Me Going My Community Keeps Me Going Urban Life
CFP: International Conference: Port Cities in Comparative Global History: Potentials and Issues. Hong Kong, 15-16 June 2023 CFP: International Conference: Port Cities in Comparative Global History: Potentials and Issues. Hong Kong, 15-16 June 2023 Urban Life
New Visa Rules for Australian Passport Holders 2024 – For Urban Women New Visa Rules for Australian Passport Holders 2024 – For Urban Women Urban Life
The Best Plants To Grow With Biodynamic Gardening The Best Plants To Grow With Biodynamic Gardening Urban Life

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Common Rainy Season Garden Pests and How to Fight Them Organically – Urban Gardening Mom
  • Top 10 Things to Do in Arequipa
  • How You Can Stomp Grapes in the Douro Valley in Portugal
  • End the rainbow! Oh, wait.
  • Million-Dollar Classic Car Masterpieces

Categories

  • Life Coach
  • Luxury Lifestyle
  • Travel Lifestyle
  • Travel Tips
  • Urban Life

Copyright © 2025 .

Powered by PressBook Blog WordPress theme