sequence over colors in R
color-palette, color-picker, colors, r
Solution
See `colorRampPalette` and the related `colorRamp` function.
palette <- colorRampPalette(colors=c("#000000", "#FFFFFF"))
cols <- palette(20)
plot(1:20, col=cols, pch=16, cex=3)
For some other interesting options, check out the colorspace package, loading it and then doing `example(rainbow_hcl)` and then, if you're intrigued by what you see, `vignette("hcl-colors")`.
Problem
Is there a way to create a sequence over colors in R? for example, anything like: ``` seq("#000000", "#999999", length=20) ```