Skip to content

Instantly share code, notes, and snippets.

@kgreger
kgreger / Preferences-Turbo-Rainbow.tps
Created August 22, 2019 14:02
The custom Tableau palette for the Turbo Rainbow palette Google AI published. Find the (messy) R code to generate it at https://gist.github.com/kgreger/50edb16656df58ba9f56590a3b9a8dbe and more information on the scientific background in the original blog at https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html.
<?xml version='1.0'?>
<workbook>
<preferences>
<color-palette name='Turbo Colormap' type='ordered-sequential' >
<color>#30123B</color>
<color>#311542</color>
<color>#33184A</color>
<color>#341B51</color>
<color>#351E58</color>
# License: Apache 2.0
turbo_colormap_data <- matrix(
c(
c(0.18995, 0.07176, 0.23217),
c(0.19483, 0.08339, 0.26149),
c(0.19956, 0.09498, 0.29024),
c(0.20415, 0.10652, 0.31844),
c(0.20860, 0.11802, 0.34607),
c(0.21291, 0.12947, 0.37314),