<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCompositingOperation/xor",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSCompositingOperation@NSCompositingOperationXOR"
  },
  "title" : "NSCompositingOperation.xor"
}
-->

# NSCompositingOperation.xor

Exclusive OR of the source and destination images.

```
case xor
```

## Discussion

The source image is applied using the formula `R = S*(1 - Da) + D*(1 - Sa)`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)