is.color {karyoploteR} | R Documentation |
Test if something is a valid color
is.color(x)
x |
The element to test |
This function tests if something is a valid color. Returns TRUE or FALSE. The function is vectorised.
TRUE is x is a valid color, FALSE otherwise
is.color("red") is.color("#333333") is.color(NA) is.color(NULL) is.color("not_a_color") is.color(3) is.color(c("not_a_color", "red", 3, "#FF0000"))