Create Color Maps in R

This is a classic in R and I tend to forget it every once in a while. So I write it down as a note for my future me.

This line creates a gray scale with len steps:

grey(1:len/len)

This line creates a color scale going through hue, saturation, and value (luminance):

hsv(1:len/len)

This line creates a color scale using the hue, chroma, luminance space:

hcl(1:360/len)

That’s it again.
Cheers, iss