isValidColor: Test if a variable could be used as a color

Description Usage Arguments Details Value

View source: R/myBasicFunctions.R

Description

Test if a variable could be used as a color

Usage

1
isValidColor(colorname)

Arguments

colorname

a string or a numerical value containing the potential color

Details

A valid color name is a numerical value or a string which is in colors() or a character vector with elements of 7 or 9 characters, "#" followed by the red, blue, green and optionally alpha values in hexadecimal (after rescaling to 0 ... 255).

Value

A boolean which would say if the colorname is a valid color name or not.


lldelisle/usefulLDfunctions documentation built on Nov. 29, 2021, 5:40 a.m.