check_colour_return_rgb {monochromeR} | R Documentation |
Checks colour variables are either RGB values, hex colour codes or a recognised colour name and converts to rgb (helper funct)
Description
Checks colour variables are either RGB values, hex colour codes or a recognised colour name and converts to rgb (helper funct)
Usage
check_colour_return_rgb(colour, colour_variable_name)
Arguments
colour |
The colour string / rgb vector to check |
colour_variable_name |
The name of the variable, for readability of error messages |
Value
An error message if the colour value can't be interpreted
Examples
check_colour_return_rgb("White", "test_colour")
## Not run: check_colour_return_rgb("foo", "test_colour")
[Package monochromeR version 0.2.0 Index]