Created
March 17, 2017 17:07
-
-
Save gregwhitworth/8a9827e1ee8b10c3cd9e36d604cce667 to your computer and use it in GitHub Desktop.
This file contains 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 night = function() { | |
vars = [ | |
{name: "--sky-start", value: "rgb(100, 75, 128)"}, | |
{name: "--sky-end", value: "rgb(45, 45, 81)"}, | |
{name: "--light-r-mod", value: "-17.5"}, | |
{name: "--light-g-mod", value: "25"}, | |
{name: "--light-b-mod", value: "110"}, | |
{name: "--show-stars", value: "block"}, | |
{name: "--building-r-mod", value: "-.25"}, | |
{name: "--building-g-mod", value: 0}, | |
{name: "--building-b-mod", value: ".15"}, | |
{name: "--park-r-mod", value: "-.30"}, | |
{name: "--park-g-mod", value: "-.20"}, | |
{name: "--park-b-mod", value: "-.08"}, | |
{name: "--light-source", value: "url(#moon)"} | |
]; | |
setVars(vars); | |
getVars(vars); | |
} | |
function setVars(variables) { | |
variables.forEach(function(prop) { | |
rootStyle.setProperty(prop.name, prop.value); | |
}, this); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment