I would not change the alpha at all. Instead, set alpha 255 in setPrivateRed: r green: g blue: b
2015-03-21 0:19 GMT+01:00 Aliaksei Syrel <alex.syrel@gmail.com>:Hi,I played with colors and found out, that��arithmetical��operations with colors are completely broken.Result is not a valid Color - just garbage. It happens because alpha is not being initialized and stays nil. It seems that operation were implemented before alpha support was added. So I propose the following solution:Color red - Color red = Color transparent(Color white alpha: 1) - ��(Color white alpha: 0.5) = (Color white alpha: 0.5)R,G,B are subtracted as before. Alpha channels are subtracted too.Color red + Color blue =��Color magentaColor red + Color transparent =��Color red(Color white alpha: 0.5) + (Color white alpha: 0.5) = (Color white alpha: 1)����R,G,B are added as before. Alpha channels are added too.Multiplication and division by number doesn't change alpha channel.Cheers,AlexI would not change the alpha at all. Instead, set alpha 255 in setPrivateRed: r green: g blue: b