You can invert colors using CIFilter with SKEffect node. Something like this should work:
SKEffectNode *effectNode = [[SKEffectNode alloc] init];
effectNode.filter = [CIFilter filterWithName:@"CIColorInvert"];
SKSpriteNode *node = yourNode;
[effectNode addChild:node];
[self addChild:effectNode];
Note that this SKSceneis a node effect, so it greatly simplifies the inversion of the entire scene:
self.filter = [CIFilter filterWithName:@"CIColorInvert"];
self.shouldEnableEffects = YES;
source
share