0

I wish to generate a plot of a single color based on a value of either CIELAB values or RGB values in R.

I have seen examples of displaying colors in RColorBrewer:

library(RColorBrewer)
mypalette<-brewer.pal(7,"Greens")
image(1:7,1,as.matrix(1:7),col=mypalette,xlab="Greens (sequential)",
      ylab="",xaxt="n",yaxt="n",bty="n")

However how could I display a single color in image()?

Cheers,

0 Answers0