is.color: Check If Valid Color Representation

Description Usage Arguments Value See Also Examples

Description

A valid color representation is any of the three kinds of R color specifications, i.e., either a color name (as listed by colors()), a hexadecimal string of the form "#rrggbb" or "#rrggbbaa" (see rgb), or a positive integer i meaning palette()[i].

Usage

1
is.color(obj)

Arguments

obj

Object: object to be tested

Value

Logical: TRUE if the object is a valid color representation, FALSE otherwise

See Also

col2rgb

Examples

1
2
3
is.color(c('red', 'blue'))
is.color(1)
is.color('abcd')

statech/CommonPlots documentation built on May 6, 2019, 1:32 a.m.