Learn R Programming

inlcolor (version 1.0.6)

is_color: Check whether a character string is a valid color specification.

Description

Check whether a character string is a valid color specification.

Usage

is_color(x, null_ok = FALSE)

Value

A 'logical' vector of the same length as argument x.

Arguments

x

'character' vector. color specification

null_ok

'logical' flag. If set to TRUE, x may also be NULL.

Author

J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center

Examples

Run this code
is_color(c("red", "zzz", "#FFFFFF", "#7FAF1B111"))

Run the code above in your browser using DataLab