Learn R Programming

CSHShydRology (version 1.4.3)

ch_circular_colors: Color Palettes for Circular

Description

Produces a vector of n contiguous colours. The original version from the package circular produced n colours with 1 and n being the same colour. This version internally produces n + 1 colours and removes the repeated end colour so there are n unique colours. Hue is calculated for points on the circle. Saturation and value default to 0.85. Default alpha is 1.0 - no transparency.

Usage

ch_circular_colors(
  n,
  m = 0,
  M = 2 * pi,
  offset = 0,
  s = 0.85,
  v = 0.85,
  alpha = 1
)

Value

a vector of length n

Arguments

n

the number of colours (<= 1) to be in the palette

m

the smallest angle in radians

M

the largest angle in radians

offset

the zero in radians

s

saturation further arguments passed to the function hsv

v

value [0.85]

alpha

alpha [1.0] no transparency

Author

Claudio Agostinelli (original) Paul Whitfield (update)

Examples

Run this code
ch_circular_colors(n=10)

Run the code above in your browser using DataLab