function mixColors(c1, c2, amount) {
  // from tinycolor
  // https://github.com/bgrins/TinyColor/blob/master/tinycolor.js#L701
  amount = (amount === 0) ? 0 : (amount || 50);

  let p = amount / 100;

  return {
    r: ((c2.r - c1.r) * p) + c1.r,
    g: ((c2.g - c1.g) * p) + c1.g,
    b: ((c2.b - c1.b) * p) + c1.b,
    // a: ((c2.a - c1.a) * p) + c1.a
  };
}
/**
 * Mixes the given colors (RGB dicts) at the given amount (0 to 100).
 */
Mixes the given colors (RGB dicts) at the given amount (0 to 100).
Mixes the given colors ( RGB dicts ) at the given amount ( 0 to 100 ) .
function mixColors(c1, c2, amount) {
  amount = (amount === 0) ? 0 : (amount || 50);
  let p = amount / 100;
  return {
    r: ((c2.r - c1.r) * p) + c1.r,
    g: ((c2.g - c1.g) * p) + c1.g,
    b: ((c2.b - c1.b) * p) + c1.b,
  };
}
function mixColors ( c1 , c2 , amount ) { amount = ( amount === 0 ) ? 0 : ( amount || 50 ) ; let p = amount / 100 ; return { r : ( ( c2 . r - c1 . r ) * p ) + c1 . r , g : ( ( c2 . g - c1 . g ) * p ) + c1 . g , b : ( ( c2 . b - c1 . b ) * p ) + c1 . b , } ; }
Mixes the given colors (RGB dicts) at the given amount (0 to 100).
Mixes the given colors ( RGB dicts ) at the given amount ( 0 to 100 ) .
// from tinycolor // https://github.com/bgrins/TinyColor/blob/master/tinycolor.js#L701 // a: ((c2.a - c1.a) * p) + c1.a