get method
Returns the ARGB color of the pixel at the given (x
, y
).
Implementation
Color get(int x, int y) {
final rgbaColor = pixels.getPixel(width, x, y).value;
final argbColor = ((rgbaColor & 0x000000FF) << 24) | ((rgbaColor & 0xFFFFFF00) >> 8);
return Color(argbColor);
}