is_color: Check if hex color code falls within specified color range

Description Usage Arguments See Also

View source: R/is_color.R

Description

Checks if a hexadecimal color value codes for a color within a specified color range. Color range is specified using EITHER col OR r/g/b arguments. Possible col specifications are: "blue", "red", "green", "white", "black" or "hazy". r/g/b each take a two-value numeric vector providing specifications of minimum/maximum red/green/blue values within the range 0-255 (e.g. c(20, 230) ).

Usage

1
is_color(hex, col = NULL, r = NULL, g = NULL, b = NULL)

Arguments

hex

hexadecimal color value to check (e. g. "#DA80F2")

col

color specification (possible choices are: "blue", "red", "green", "white", "black", "hazy")

r

a two-value vector

g

a two-value vector

b

a two-value vector

See Also

col2rgb


AnonZebra/synratss documentation built on Oct. 9, 2021, 2:31 a.m.