code: function colorBlend(mode, color1, color2) {
      var ab = color1.alpha, cb, // backdrop
          as = color2.alpha, cs, // source
          ar, cr, r = [];        // result
  
      ar = as + ab * (1 - as);
      for (var i = 0; i < 3; i++) {
          cb = color1.rgb[i] / 255;
          cs = color2.rgb[i] / 255;
          cr = mode(cb, cs);
          if (ar) {
              cr = (as * cs + ab * (cb
                  - as * (cb + cs - cr))) / ar;
          }
          r[i] = cr * 255;
      }
  
      return new(tree.Color)(r, ar);
  }
docs: Color Blending ref: http://www.w3.org/TR/compositing-1