Use Math.round() instead of .toFixed(0) in background-gradient.