Test if R can interpret a string as a colour

isColourStr(col)

Arguments

col

The string to be tested.

Value

A boolean value, TRUE if col is a valid colour, FALSE otherwise

Examples

isColourStr('black')
#> black 
#>  TRUE 
isColourStr('blakc')
#> blakc 
#> FALSE