This can be accomplished with D3.js[1] to bind data to HTML elements -- a div block, in your case -- and color them based on value.<p>D3 is a big library, so you'll likely only need these modules:<p><pre><code> d3-selection
d3-scale
</code></pre>
[1]: <a href="https://d3js.org/" rel="nofollow">https://d3js.org/</a>