<nav class="navbar">Title</nav>
    <div class="container">
        <div>
            <input type="button" value="Red" id="toggle-red" />
                      <input type="button" value="Blue" id="toggle-blue" />            <input type="button" value="Green" id="toggle-green" />
            
        </div>

        <h2 class="title">What is Lorem Ipsum?</h2>
        <p class="content">
            Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy
            text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen
            book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially
            unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages,
            and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
        </p>
    </div>
    <footer>
        Copyright 2018
    </footer>
:root{
  --red-hue: 360;
  --blue-hue: 240;
  --green-hue: 120;
  --main-hue : var(--red-hue);
}

* {
  margin: 0;
}
html{
  height: 100%;
}
body{
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont,
  “Segoe UI”, “Roboto”, “Oxygen”, “Ubuntu”, “Cantarell”,
  “Fira Sans”, “Droid Sans”, “Helvetica Neue”,
  sans-serif;
  display: flex;
  flex-direction: column;
}
nav{
  background: hsl(var(--main-hue) , 50%, 50%);
  padding: 1.3rem;
  color: hsl(var(--main-hue) , 50%, 50%);
}
.container{
  flex: 1;
  background:hsl(var(--main-hue), 50%, 95%);
  padding: 1rem;
}
p.content{
  padding: 0.7rem;
  font-size: 0.7rem;
  color: hsl(var(--main-hue), 50%, 50%);
}
.container h2.title{
  padding: 1rem;
  color: hsl(var(--main-hue), 50%, 20%);
}
footer{
  background: hsl(var(--main-hue), 93%, 88%);
  padding: 1rem;
}
input[type=button] {
  color:hsl(var(--main-hue), 50%, 20%);
  padding: 0.3rem;
  font-size: 1rem;
}
* {
  margin: 0;
}
html{
  height: 100%;
}
body{
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont,
  “Segoe UI”, “Roboto”, “Oxygen”, “Ubuntu”, “Cantarell”,
  “Fira Sans”, “Droid Sans”, “Helvetica Neue”,
  sans-serif;
  display: flex;
  flex-direction: column;
}
nav{
  background: hsl(var(--main-hue), 50%, 50%);
  padding: 1.3rem;
  color: hsl(var(--main-hue), 50%, 10%);
}
.container{
  flex: 1;
  background:hsl(var(--main-hue), 50%, 95%);
  padding: 1rem;
}
p.content{
  padding: 0.7rem;
  font-size: 0.7rem;
  color: hsl(var(--main-hue), 50%, 50%);
}
.container h2.title{
  padding: 1rem;
  color: hsl(var(--main-hue), 50%, 20%);
}
footer{
  background: hsl(var(--main-hue), 93%, 88%);
  padding: 1rem;
}
input[type=button] {
  color:hsl(var(--main-hue), 50%, 20%);
  padding: 0.3rem;
  font-size: 1rem;
}
document.body.onload = ()=>{
  
  const redBtn = document.querySelector('#toggle-red');
  const blueBtn = document.querySelector('#toggle-blue');
  const greenBtn = document.querySelector('#toggle-green');
  
  redBtn.addEventListener('click',(e)=>{
 
    console.log("red");
    document.documentElement.style.setProperty('--main-hue', 360);
 })
  
blueBtn.addEventListener('click',(e)=>{
    document.documentElement.style.setProperty('--main-hue', 240);
  })
  
  greenBtn.addEventListener('click',(e)=>{
    document.documentElement.style.setProperty('--main-hue', 120);
  })  
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.