def _mix(a, b, f): #Used for the blend function (mixes colors according to their alpha values) c = numpy.multiply(numpy.subtract(b,a),f) return numpy.add(numpy.right_shift(c,8),a)