---
title: CGBlendMode.difference
framework: coregraphics
role: symbol
role_heading: Case
path: coregraphics/cgblendmode/difference
---

# CGBlendMode.difference

## Declaration

```swift
case difference
```

## Discussion

Discussion Subtracts either the source image sample color from the background image sample color, or the reverse, depending on which sample has the greater brightness value. Source image sample values that are black produce no change; white inverts the background color values.

## See Also

### Constants

- [CGBlendMode.normal](coregraphics/cgblendmode/normal.md)
- [CGBlendMode.multiply](coregraphics/cgblendmode/multiply.md)
- [CGBlendMode.screen](coregraphics/cgblendmode/screen.md)
- [CGBlendMode.overlay](coregraphics/cgblendmode/overlay.md)
- [CGBlendMode.darken](coregraphics/cgblendmode/darken.md)
- [CGBlendMode.lighten](coregraphics/cgblendmode/lighten.md)
- [CGBlendMode.colorDodge](coregraphics/cgblendmode/colordodge.md)
- [CGBlendMode.colorBurn](coregraphics/cgblendmode/colorburn.md)
- [CGBlendMode.softLight](coregraphics/cgblendmode/softlight.md)
- [CGBlendMode.hardLight](coregraphics/cgblendmode/hardlight.md)
- [CGBlendMode.exclusion](coregraphics/cgblendmode/exclusion.md)
- [CGBlendMode.hue](coregraphics/cgblendmode/hue.md)
- [CGBlendMode.saturation](coregraphics/cgblendmode/saturation.md)
- [CGBlendMode.color](coregraphics/cgblendmode/color.md)
- [CGBlendMode.luminosity](coregraphics/cgblendmode/luminosity.md)
