Making color scale use requestAnimationFrame instead of painting canvas on every value change. Further optimizations are needed.