Skip to content

Instantly share code, notes, and snippets.

@danielvlopes
Last active March 8, 2017 02:08
Show Gist options
  • Save danielvlopes/475f660f2b8f4c80dfd222501e915a98 to your computer and use it in GitHub Desktop.
Save danielvlopes/475f660f2b8f4c80dfd222501e915a98 to your computer and use it in GitHub Desktop.
Applet Cookbook: Shuffle colors
var colors = ["#FF8400", "#FF0000", "#15FF00", "#FF00D4","#00D4FF","#003CFF"]
var index = Math.floor((Math.random() * colors.length))
Lifx.color.setAdvancedOptions('color: ' + colors[index] + '; brightness: 1; duration: 12')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment