Layer.getMainPixel

Function/Meaning

Get the color of the main image

Type
Layerclassmethod of
Syntax
getMainPixel(x, y)
Arguments
x

Specifies the x coordinate (in the image coordinates of the layer) to get the color.

y

Specifies the y coordinate (in the image coordinates of the layer) to get the color.

Return value

0xRRGGBB format color number

Explanation

Layer Gets the color at any position in the main image (the image that retains the color).
An exception is thrown if you specify an invalid (out of range) position as the image coordinates.