is.color {karyoploteR} | R 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"))

[Package karyoploteR version 1.12.4 Index]