colors.are.grayscale: Check for the given color strings whether they represent gray...

View source: R/helpers.R

colors.are.grayscaleR Documentation

Check for the given color strings whether they represent gray scale colors.

Description

Check for the given color strings whether they represent gray scale colors.

Usage

colors.are.grayscale(col_strings, accept_col_names = TRUE)

Arguments

col_strings

vector of RGB(A) color strings, like c("#FFFFFF", ("#FF00FF")).

accept_col_names

logical, whether to accept color names like 'white'. Disables all sanity checks.

Value

logical vector

Examples

colors.are.grayscale(c("#FFFFFF", "#FF00FF"));
all((colors.are.grayscale(c("#FFFFFF00", "#ABABABAB"))));


dfsp-spirit/nitools documentation built on Jan. 26, 2024, 8:24 p.m.