Using the colorspace package in R
The open source software R provides a package called (Ihaka, Murrell, Hornik, Fisher, & Zeileis, 2016) which uses
Ihaka’s colorspace library. The package offers some presetted color palettes
heat_hcl, …) to compare to the default RGB color
palettes. Furthermore there is a graphical user interface (GUI) where you can
design your own color palette. The function therefore is called
choose_palette() (needs some dependent packages) and use them for your own
The first thing you need is an R installation on your computer. The installation packages for all available operating systems (Windows, OSX, Linux) can be found on the http://cran.r-project.org. The installation is no adventure and the R base version just needs a few MB of free space. For beginners the R-Studio GUI is recommended (or a similar R editor).
After R is successfully installed on your system you can install optional packages like the colorspace package. You can simply do that over your GUI interface or install them by using the following code line:
R asks you for a mirror where to download the package and automatically installs other dependent packages. After this step you should allready be able to use the colorspace package. There is a minimal example below which produces a scatter plot to show how it basically works.
- Ihaka, R., Murrell, P., Hornik, K., Fisher, J. C., & Zeileis, A. (2016). colorspace: Color Space Manipulation. Retrieved from http://CRAN.R-project.org/package=colorspace