Skip to content

Instantly share code, notes, and snippets.

@gregwhitworth
Created March 17, 2017 17:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregwhitworth/8a9827e1ee8b10c3cd9e36d604cce667 to your computer and use it in GitHub Desktop.
Save gregwhitworth/8a9827e1ee8b10c3cd9e36d604cce667 to your computer and use it in GitHub Desktop.
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