0👍
You need to make the colorStops really close to each other like so :
grd.addColorStop(0.000, 'rgba(0, 255, 0, 1.000)');
grd.addColorStop(0.199, 'rgba(0, 255, 0, 1.000)');
grd.addColorStop(0.200, 'rgba(191, 255, 0, 1.000)');
grd.addColorStop(0.399, 'rgba(191, 255, 0, 1.000)');
grd.addColorStop(0.400, 'rgba(221, 255, 0, 1.000)');
grd.addColorStop(0.599, 'rgba(221, 255, 0, 1.000)');
grd.addColorStop(0.600, 'rgba(255, 229, 0, 1.000)');
grd.addColorStop(0.799, 'rgba(255, 229, 0, 1.000)');
grd.addColorStop(0.800, 'rgba(255, 144, 0, 1.000)');
grd.addColorStop(0.999, 'rgba(255, 144, 0, 1.000)');
grd.addColorStop(1.000, 'rgba(255, 50, 0, 1.000)');
Source:stackexchange.com