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

# CGBlendMode.hardLight

## Declaration

```swift
case hardLight
```

## Discussion

Discussion Either multiplies or screens colors, depending on the source image sample color. If the source image sample color is lighter than 50% gray, the background is lightened, similar to screening. If the source image sample color is darker than 50% gray, the background is darkened, similar to multiplying. If the source image sample color is equal to 50% gray, the source image is not changed. Image samples that are equal to pure black or pure white result in pure black or white. The overall effect is similar to what you’d achieve by shining a harsh spotlight on the source image. Use this to add highlights to a scene.

## 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.difference](coregraphics/cgblendmode/difference.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)
