RGBA invert(RGBA color) { return new RGBA( red: clampPixel(255 - color.red), green: clampPixel(255 - color.green), blue: clampPixel(255 - color.blue), alpha: color.alpha, ); }