ggthemr (version 1.0.2)

is_colour: Is an object a valid colour?

Description

Check an object to see if it is a valid colour or set of colours.

Usage

is_colour(x)
"is_colour"(x)
"is_colour"(x)
"is_colour"(x)
"is_colour"(x)

Arguments

x
object to be tested.

Details

Colours in R can be represented by names (colours), index number (palette) or a hexidecimal character.

Examples

Run this code
is_colour('#ffffff')
is_colour('white')
is_colour('periwinkle blue')
is_colour(4L)

Run the code above in your browser using DataLab