Helper function to detect any color (in an individual character string)

isCol(color)

Author

ipda | unhcr.org | 2020

Examples

{ isCol("white") isCol(col2hex("black", alpha = 255/2)) isCol(NA) isCol("bumblebee") # BUT note: isCol(col2rgb("white")) # => FALSE FALSE FALSE }
#> [1] FALSE FALSE FALSE