Colors are mysterious business and choosing the right color or color palette for an R graphics can sometimes be a chore. To alleviate this burden, I present two functions for choosing color values.

To access these functions install the RSurvey package and its dependencies:


Choose Color

The first function, ChooseColor (source), calls upon a graphical user interface (GUI) for choosing a color in the HSV color space (fig. 1).

col <- RSurvey::ChooseColor(col = "#669933")


Figure 1: A screenshot of the HSV color tool.

Choose Color Palette

The second function, choose_palette (source), calls upon a GUI for choosing a color palette in the HCL (Hue, Chroma, and Luminance) color space (fig. 2).

pal <- colorspace::choose_palette(terrain_hcl)


Figure 2: A screenshot of the HCL color palette tool.

An example graphic accompanies the GUI and may be used to evaluate the robustness of individual color schemes (fig. 3).


Figure 3: Example graphic based on selected color palette.