src/colour.js
function getColourAt(gradient, p) {
  p = clamp(p, 0, 0.9999);  // FIXME
  let r = Math.floor(p * (gradient.length - 1));
  let q = p * (gradient.length - 1) - r;
  return Colour.mix(gradient[r + 1], gradient[r], q);
}
function getColourAt(gradient, p) {
  p = clamp(p, 0, 0.9999);  // FIXME
  let r = Math.floor(p * (gradient.length - 1));
  let q = p * (gradient.length - 1) - r;
  return Colour.mix(gradient[r + 1], gradient[r], q);
}
function getColourAt ( gradient , p ) { p = clamp ( p , 0 , 0.9999 ) ; // FIXME let r = Math . floor ( p * ( gradient . length - 1 ) ) ; let q = p * ( gradient . length - 1 ) - r ; return Colour . mix ( gradient [ r + 1 ] , gradient [ r ] , q ) ; }
Gets the colour of a multi-step gradient at a given percentage p
Gets the colour of a multi - step gradient at a given percentage p