saldek,
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<span>28.03.2018</span><br>
<span>29.03.2018</span><br>
<span>30.03.2018</span><br>
<span>31.03.2018</span><br>
<span>01.04.2018</span><br>
<span>02.04.2018</span><br>
<script>
var now = Date.now();
[].forEach.call(document.querySelectorAll('span'), function(el){
var color = ['#ff0000','#ff7700','#DD8800','#77AA00','#44CC00','#00ff00'],
date = el.textContent.replace(/(\d+)\.(\d+)\.(\d+)/, '$2/$1/$3');
date = Date.parse(date);
date = (date - now)/86400000|0||0;
var ost = Math.max(0,Math.min(color.length,date));
el.style.color = color[ost];
});
</script>
</body>
</html>