fix up RoomSettings somewhat and implement room colors

This commit is contained in:
Matthew Hodgson 2016-01-08 03:22:38 +00:00
parent 8170288acb
commit ef00a1624d
7 changed files with 231 additions and 42 deletions

View file

@ -126,6 +126,11 @@ module.exports = {
cached = true;
}
if (!primaryColor) {
primaryColor = "#76CFA6"; // Vector green
secondaryColor = "#EAF5F0"; // Vector light green
}
if (!secondaryColor) {
var x = 0.16; // average weighting factor calculated from vector green & light green
var rgb = hexToRgb(primaryColor);
@ -145,6 +150,13 @@ module.exports = {
tertiaryColor = rgbToHex(rgb1);
}
if (colors[0] === primaryColor &&
colors[1] === secondaryColor &&
colors[2] === tertiaryColor)
{
return;
}
colors = [primaryColor, secondaryColor, tertiaryColor];
// go through manually fixing up the stylesheets.