color: color

Description Usage Arguments Details Value Examples

View source: R/lifx-cloud.R

Description

set lifx color

Usage

1
color(color, selector = "all", duration = 1, power_on = TRUE)

Arguments

color

a string describing the desired color; see examples.

selector

a string in format '[type]:[value]', where type can be 'all', 'id', 'label', 'group', 'group_id', 'location', 'location_id', 'scene_id', and value is what you want to target. The default is 'all', which needs no value argument.

duration

the length of the effect

power_on

should the light be powered on if it is off? (FALSE just leaves light off)

Details

Note that the kelvin temperature ranges from 2700 to 8000. Hue in HSB list is a number between 0 and 360, whereas saturation and brightness should be between 0 and 1.

Value

httr response object

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
 color("green", "label:desk")   # deep green, brightness untouched on lights labeled 'desk'
 color("blue brightness:100%")  # deep blue, maximum brightness
 color("hsb:0,1,1")             # deep red, maximum brightness
 color("random")                # random hue, maximum saturation, brightness untouched
 color("kelvin:2700")           # warm white, brightness untouched
 color("saturation:100%")       # set maximum saturation

## End(Not run)

cboettig/lifxr documentation built on May 12, 2017, 12:07 a.m.