Last active
March 8, 2017 02:08
-
-
Save danielvlopes/475f660f2b8f4c80dfd222501e915a98 to your computer and use it in GitHub Desktop.
Applet Cookbook: Shuffle colors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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