getColors

.getColors()

Returns the current colour used for drawing to this Image, packed into a number. This is an ARGB integer, where each component takes up one byte, and can be retrieved using bit-shifting and bit-wise and.

Note that the alpha value is stored as a whole number, from 0 to 255.

.getColors() { |red, green, blue, alpha| ... }

Yields the current colour used for drawing into the block provided.

Unlike the other version of 'getColors', the 'alpha' value is in it's proper format, a value from 0.0 to 1.0.

See also

setColor - getAlpha - getRed - getGreen - getBlue