Skip to content

Instantly share code, notes, and snippets.

@bdjnk
Created September 25, 2015 01:22
Show Gist options
  • Save bdjnk/a1aa6358405fc58f21a2 to your computer and use it in GitHub Desktop.
Save bdjnk/a1aa6358405fc58f21a2 to your computer and use it in GitHub Desktop.
Generates and applies nice tint hues for your Lightning Launcher desktop wallpaper.
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