is.color: is.color

View source: R/color.R

is.colorR Documentation

is.color

Description

Test if something is a valid color

Usage

is.color(x)

Arguments

x

The element to test

Details

This function tests if something is a valid color. Returns TRUE or FALSE. The function is vectorised.

Value

TRUE is x is a valid color, FALSE otherwise

Examples

 
is.color("red")
is.color("#333333")
is.color(NA)
is.color(NULL)
is.color("not_a_color")
is.color(3)

is.color(c("not_a_color", "red", 3, "#FF0000"))
 

bernatgel/karyoploteR documentation built on Feb. 1, 2024, 11:48 p.m.