colors.have.transparency: Check for the given color strings whether they have...

View source: R/helpers.R

colors.have.transparencyR Documentation

Check for the given color strings whether they have transparency, i.e., an alpha channel value != fully opaque.

Description

Check for the given color strings whether they have transparency, i.e., an alpha channel value != fully opaque.

Usage

colors.have.transparency(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.have.transparency(c("#FFFFFF", "#FF00FF", "#FF00FF00", "red", "#FF00FFDD"));
all((colors.have.transparency(c("#FFFFFF00", "#ABABABAB"))));


fsbrain documentation built on July 9, 2023, 7:12 p.m.