Photoshop two-color blending formulas in JS