Skip to contents

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

Usage

isHexColorFunction(x, nullOk = FALSE)

Arguments

x

Object.

nullOk

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

Value

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

Note

Updated 2022-10-18.

See also

RColorBrewer, viridis packages.

Examples

## TRUE ====
x <- viridis::viridis
isHexColorFunction(x)
#> [1] TRUE

## FALSE ====
x <- ggplot2::scale_color_manual
isHexColorFunction(x)
#> [1] FALSE