Description Usage Arguments Details Value Examples
check if 'LIFX' color name is valid
1 | lx_check_color(color_name, token = lx_get_token())
|
color_name |
a color string in 'LIFX' api format (can be made with |
token |
API token (see ?lx_save_token). If left empty, the token is retrieved from the environmental variable if available. (see |
calls the API endpoint https://api.lifx.com/v1/color to check if the color is valid.
logical TRUE if the color name is valid; FALSE if not; throws an error if the API could not be reached or another issue occurred.
1 2 3 4 5 6 7 | ## Not run:
lx_check_color("INVALID_COLOR_NAME") # invalid 'LIFX' color string returns FALSE
lx_check_color("#FFFFFF") # valid 'LIFX' color string returns TRUE
lx_check_color("orange") # valid 'LIFX' color string returns TRUE
lx_check_color('brightness:1 hue:50') # valid 'LIFX' color string returns TRUE
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.