Some bugfixes, simplify the gradient calculations to use RGBA instead of HSB