This package generates and plot palettes of optimally distinct colours
in perceptually uniform colour space, based on
iwanthue. This is done
through k-means clustering of CIE Lab colour space, according to
user-selected constraints on hue, chroma, and lightness.
iwanthue palettes can be added directly onto
ggplot2 objects via the
functions scale_colour_iwanthue() and scale_fill_iwanthue().
Installation
The current CRAN version of hues can be installed with:
install.packages('hues')
The development version of hues can be installed using
install_github from the
devtools package:
# install.packages('devtools') # uncomment if devtools isn't already installed
devtools::install_github('johnbaums/hues')
Examples
The examples below show palettes corresponding to some presets given at
the iwanthue website.
hues
This package generates and plot palettes of optimally distinct colours in perceptually uniform colour space, based on iwanthue. This is done through k-means clustering of CIE Lab colour space, according to user-selected constraints on hue, chroma, and lightness.
iwanthuepalettes can be added directly onto ggplot2 objects via the functionsscale_colour_iwanthue()andscale_fill_iwanthue().Installation
The current CRAN version of
huescan be installed with:The development version of
huescan be installed usinginstall_githubfrom thedevtoolspackage:Examples
The examples below show palettes corresponding to some presets given at the iwanthue website.
ggplot2integration