function rgbaDifference(aa, bb, dir) {
  const rgba = new Uint8Array(4);
  rgba[0] = aa[0] + bb[0] * dir;
  rgba[1] = aa[1] + bb[1] * dir;
  rgba[2] = aa[2] + bb[2] * dir;
  rgba[3] = aa[3] + bb[3] * dir;
  return (rgba);
}
@param {Uint8Array} aa
@param {Uint8Array} bb
@param {Number} dir
@return {Uint8Array}