---
title: hardLight
framework: swiftui
role: symbol
role_heading: Type Property
path: swiftui/graphicscontext/blendmode-swift.struct/hardlight
---

# hardLight

A mode that either multiplies or screens colors, depending on the source image sample color.

## Declaration

```swift
static var hardLight: GraphicsContext.BlendMode { get }
```

## Discussion

Discussion 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

### Adding contrast

- [overlay](swiftui/graphicscontext/blendmode-swift.struct/overlay.md)
- [softLight](swiftui/graphicscontext/blendmode-swift.struct/softlight.md)
