powered by
This function by Josh O'Brien checks whether elements of a vector are valid colors. It has been copied from a Stack Exchange answer (see http://stackoverflow.com/questions/13289009/check-if-character-string-is-a-valid-color-representation).
areColors(x)
The vector.
A logical vector.
# NOT RUN { areColors(c(NA, "black", "blackk", "1", "#00", "#000000")); # }
Run the code above in your browser using DataLab