Does the input contain hexadecimal colors?
Source:R/check-vector-isHexColor.R
check-vector-isHexColor.Rd
Does the input contain hexadecimal colors?
Examples
## TRUE ====
x <- viridis::viridis(n = 2L)
class(x)
#> [1] "character"
print(x)
#> [1] "#440154FF" "#FDE725FF"
isHexColor(x)
#> [1] TRUE TRUE
## FALSE ====
x <- ggplot2::scale_color_manual
class(x)
#> [1] "function"
isHexColor(x)
#> [1] FALSE