Created
September 25, 2015 01:22
-
-
Save bdjnk/a1aa6358405fc58f21a2 to your computer and use it in GitHub Desktop.
Generates and applies nice tint hues for your Lightning Launcher desktop wallpaper.
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
golden_ratio_conjugate = 0.618033988749895; | |
var desktop = LL.getCurrentDesktop(); | |
var hue = desktop.getTag("hue"); | |
if (!hue) { hue = Math.random(); } | |
else { hue = parseFloat(hue); } | |
hue += golden_ratio_conjugate; | |
hue %= 1; | |
desktop.setTag("hue", hue.toString()); | |
hue *= 360; | |
hsv = [hue, 0.4, 0.4]; | |
var color = Color.HSVToColor(0x80, hsv); | |
desktop.getProperties().edit() | |
.setInteger("bgColor", color) | |
.commit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment