Colour Palettes Based on the Scientific Colour-Maps

Colour choice in information visualisation is important in order to avoid being mislead by inherent bias in the used colour palette. The 'scico' package provides access to the perceptually uniform and colour-blindness friendly palettes developed by Fabio Crameri and released under the "Scientific Colour-Maps" moniker. The package contains 24 different palettes and includes both diverging and sequential types.


Travis-CI Build Status AppVeyor Build Status CRAN_Release_Badge CRAN_Download_Badge

This is a small package to provide access to the colour palettes developed by Fabio Crameri and published at http://www.fabiocrameri.ch/colourmaps.php. It uses more or less the same api as viridis and provides scales for ggplot2 without requiring ggplot2 to be installed.

Installation

scico is not available on CRAN yet but can be installed from github

devtools::install_github("thomasp85/scico")

Palettes

scico provides 17 different palettes, all of which are perceptually uniform and colourblind safe. An overview can be had with the scico_palette_show() function:

library(scico)
 
scico_palette_show()

Once you've decided on a palette you can generate colour values using the scico() function:

scico(30, palette = 'lapaz')
#>  [1] "#190C65" "#1D196C" "#1E2575" "#202F7D" "#223A85" "#25448B" "#274E92"
#>  [8] "#2A5898" "#2E629D" "#336CA1" "#3774A3" "#3F7DA5" "#4886A6" "#528EA6"
#> [15] "#5F95A5" "#6C9AA3" "#7A9E9F" "#87A19A" "#95A494" "#A2A58F" "#ADA78B"
#> [22] "#BBA989" "#CAAD8A" "#DBB592" "#EBC0A0" "#F6CCB0" "#FBD7C2" "#FDE0D2"
#> [29] "#FFEAE2" "#FFF2F2"

ggplot2 support

scico provides relevant scales for use with ggplot2. It only suggests ggplot2 in order to stay lightweight, but if ggplot2 is available you'll have access to the scale_[colour|fill]_scico() functions:

library(ggplot2)
volcano <- data.frame(
  x = rep(seq_len(ncol(volcano)), each = nrow(volcano)),
  y = rep(seq_len(nrow(volcano)), ncol(volcano)),
  height = as.vector(volcano)
)
ggplot(volcano, aes(x = x, y = y, fill = height)) + 
  geom_raster() + 
  scale_fill_scico(palette = 'davos') 

References

  • Crameri, Fabio. (2018, May 8). Scientific colour maps (Version 3.0.1). Zenodo. doi:10.5281/zenodo.1243909
  • Crameri, Fabio. (2018). Geodynamic diagnostics, scientific visualisation and StagLab 3.0. Geosci. Model Dev. Discuss. doi:10.5194/gmd-2017-328

News

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("scico")

1.1.0 by Thomas Lin Pedersen, 2 months ago


https://github.com/thomasp85/scico


Report a bug at https://github.com/thomasp85/scico/issues


Browse source code at https://github.com/cran/scico


Authors: Thomas Lin Pedersen [aut, cre] , Fabio Crameri [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports grDevices

Suggests ggplot2, testthat, dplyr


Imported by paletteer.

Suggested by colorspace.


See at CRAN