is.color: is.color

Description Usage Arguments Details Value Examples

View source: R/color.R

Description

Test if something is a valid color

Usage

1

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 
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"))
 

karyoploteR documentation built on Nov. 8, 2020, 5:52 p.m.