Where you have:
Change it for this:
Color class is used to encapsulate colors in the default RGB color space or colors in arbitrary color spaces identified by
Each color has an implicit alpha value of
1.0 or an explicit one provided in the constructor. The alpha value defines the transparency of a color and can be represented by a floating value in the range of
0,0 - 1,0 or
0 - 255 .
An alpha value of
255 means that the color is completely opaque and an alpha value of
0,0 means that the color is completely transparent. When you build a color with an explicit alpha or you get the color / alpha components of a color, the color components are never premultiplied by the alpha component.
Take a look at the documentation that is very understandable.