This assert check is intended primarily to check for RColorBrewer or viridis hexadecimal color value return.

isHexColorFunction(x, nullOK = FALSE, .xname = getNameInParent(x))

Arguments

x

Object.

nullOK

logical(1). If set to TRUE, x may also be NULL.

.xname

Name of object defined in x. Not intended to be used directly.

Value

TRUE on success; FALSE on failure, with cause set.

Note

Updated 2019-08-10.

See also

RColorBrewer, viridis packages.

Examples

## TRUE ==== x <- viridis::viridis isHexColorFunction(x)
#> [1] TRUE
## FALSE ==== x <- ggplot2::scale_color_manual isHexColorFunction(x)
#> [1] FALSE #> Cause: 'x' does not contain an 'n' argument.