Fixing calculation of RGB components (forgot 0.0-1.0 for CGFloat) /thanks @mikeash