
          case b: h = (r - g) / d + 4; break;
      }
      h /= 6;
  }

  h = Math.round(360*h);
  s = s*100;
  s = Math.round(s);
  l = l*100;
  l = Math.round(l);

  return h;
}

function toggleOptions(event) {
	if (event.target.classList.contains('button') || event.target.id === 'lightnessSlider') {
		return;
	}

	this.classList.toggle('closed');
	document.querySelector('.menuButton').classList.toggle('open');
}

window.onload = function() {
	let clock = new Clock();
	clock.sta