Skip to contents

Is it an HSL triple?

Usage

is_hsl_color(x)

Arguments

x

A character vector.

Value

Logical vector; TRUE for H, S%, L% with hue 0-360 and S/L 0-100%.

See also

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

Examples

is_hsl_color(c("195, 100%, 27%", "0, 0%, 0%", "195, 100, 27", NA))
#> [1]  TRUE  TRUE FALSE    NA