Skip to contents

Is it an RGB triple?

Usage

is_rgb_color(x)

Arguments

x

A character vector.

Value

Logical vector; TRUE for three comma-separated integers 0-255.

See also

Other color detectors: is_cmyk_color(), is_color_name(), is_hex_color(), is_hsl_color()

Examples

is_rgb_color(c("220,220,220", "128, 64, 32", "300,0,0", NA))
#> [1]  TRUE  TRUE FALSE    NA