Learn R Programming

lessR (version 3.7.0)

showWheel: Hue, Chroma, Luminance (hcl) Color Space Wheel

Description

Generates a color wheel for specified hcl colors at fixed values of chroma and luminance for a range of hues, or for a manually specified set of colors.

Usage

showWheel(clr="discrete", h1=0, h2=NULL, n=10, c=100, l=65, fixup=TRUE,
         radius=0.9, …)

Arguments

clr

Optional specified colors to plot on the wheel. If list of custom colors, then the following parameters are not relevant.

h1

Beginning hue, 0 to 360.

h2

Ending hue, 0 to 360.

n

Number of hues to display.

c

Constant value of chroma.

l

Constant value of luminance.

fixup

R parameter name. If TRUE, then HCL values outside of the displayable RGB color space are transformed to fit into that space so as to display.

radius

Size of wheel.

Other parameter values.

Details

The hcl color space can provide palette of colors that have the same gray-scale intensities if desaturated. That means, no brightness bias for viewing different colors that represent different areas, such as in a bar chart of two variables, or a pie chart.

Plots a hcl color wheel with constant chroma and luminance. Or, enter a set of custom colors. Also lists the hue values and associated colors.

See Also

hcl.

Examples

Run this code
# NOT RUN {
# default color wheel
showWheel()

# generate a color wheel with 10 slices, starting at h=220 (blue)
showWheel(h1=220, h2=200, n=10)

# manual entry
showWheel(c("black", "blue", "red"))
# }

Run the code above in your browser using DataLab