<div id="app">
  <div>{{ date }}</div>
</div>
@import url(https://fonts.googleapis.com/css?family=Montserrat);

html,body {
  width: 100vw;
  height: 100vh;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: montserrat;
  background: 
		linear-gradient(rgba(196, 102, 0, 0.6), rgba(155, 89, 182, 0.6));
}

#app {
  background: white;
	border: 0 none;
	border-radius: 3px;
	box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.4);
	padding: 20px 30px;
	box-sizing: border-box;
  text-align: center;
  min-width: 30vw;
  min-height: 30vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3vw;
  color: #fff;
}
function hashCode (str) {
  let hash = 0;
  for (let i = 0; i < str.length; i++) {
    hash = str.charCodeAt(i) + ((hash << 5) - hash)
  }
  return hash
}

function intToRGB (i) {
  let c = (i & 0x00FFFFFF).toString(16).toUpperCase()
  return '000000'.substring(0, 6 - c.length) + c
}

let app = new Vue({
  el: '#app',
  data () {
    return {
      date: ''
    }
  },
  created: function () {
    let me = this
    setInterval(function () {
      let time = new Date()
      me.date = time.getHours() + ':' + time.getMinutes() + ':' + time.getSeconds()
    },1000)
  },
  watch: {
    date: function (val) {
      this.$el.style.backgroundColor = '#' + intToRGB(hashCode(val + val.split(':')[2]))
    }
  }
})
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/vue/2.3.4/vue.min.js