src/js/color.js
// *i* is a number between 0 and 1. Full red is 0, full green is 1.
i* is a number between 0 and 1. Full red is 0, full green is 1.
i * is a number between 0 and 1 . Full red is 0 full green is 1 .
function numberToColorHsl (i) {
  const hue = i * 120 / 360;
  const saturation = 0.7;
  const lightness = 0.92;
  const rgb = hslToRgb(hue, saturation, lightness);
  return 'rgb(' + rgb[0] + ',' + rgb[1] + ',' + rgb[2] + ')';
}
function numberToColorHsl ( i ) { const hue = i * 120 / 360 ; const saturation = 0.7 ; const lightness = 0.92 ; const rgb = hslToRgb ( hue , saturation , lightness ) ; return 'rgb(' + rgb [ 0 ] + ',' + rgb [ 1 ] + ',' + rgb [ 2 ] + ')' ; }
i* is a number between 0 and 1.
i * is a number between 0 and 1 .
// get a hue somewhere between red and green // tweak the following two lines to get the right tone/shade