---
title: hardLightBlendMode()
framework: coreimage
role: symbol
role_heading: Type Method
path: coreimage/cifilter-swift.class/hardlightblendmode()
---

# hardLightBlendMode()

Blends colors of two images by screening and multiplying.

## Declaration

```swift
class func hardLightBlendMode() -> any CIFilter & CICompositeOperation
```

## Return Value

Return Value The modified image.

## Discussion

Discussion This method applies the hard-light blend mode filter to an image. The effect calculates the brightness of the colors in the background image. Colors that are lighter than 50 percent gray become lighter. If the brightness of the colors in the input image are darker then 50 percent gray, the effect darkens the colors. The filter then uses the calculated results to create the output image. The hard-light blend mode filter uses the following properties: The following code creates a filter that mixes the colors and results in an output image that’s darker and more saturated: func hardLightBlendMode(inputImage: CIImage, backgroundImage: CIImage) -> CIImage {     let colorBlendFilter = CIFilter.hardLightBlendMode()     colorBlendFilter.inputImage = inputImage     colorBlendFilter.backgroundImage = backgroundImage     return colorBlendFilter.outputImage! }

## See Also

### Filters

- [additionCompositing()](coreimage/cifilter-swift.class/additioncompositing().md)
- [colorBlendMode()](coreimage/cifilter-swift.class/colorblendmode().md)
- [colorBurnBlendMode()](coreimage/cifilter-swift.class/colorburnblendmode().md)
- [colorDodgeBlendMode()](coreimage/cifilter-swift.class/colordodgeblendmode().md)
- [darkenBlendMode()](coreimage/cifilter-swift.class/darkenblendmode().md)
- [differenceBlendMode()](coreimage/cifilter-swift.class/differenceblendmode().md)
- [divideBlendMode()](coreimage/cifilter-swift.class/divideblendmode().md)
- [exclusionBlendMode()](coreimage/cifilter-swift.class/exclusionblendmode().md)
- [hueBlendMode()](coreimage/cifilter-swift.class/hueblendmode().md)
- [lightenBlendMode()](coreimage/cifilter-swift.class/lightenblendmode().md)
- [linearBurnBlendMode()](coreimage/cifilter-swift.class/linearburnblendmode().md)
- [linearDodgeBlendMode()](coreimage/cifilter-swift.class/lineardodgeblendmode().md)
- [linearLightBlendMode()](coreimage/cifilter-swift.class/linearlightblendmode().md)
- [luminosityBlendMode()](coreimage/cifilter-swift.class/luminosityblendmode().md)
- [minimumCompositing()](coreimage/cifilter-swift.class/minimumcompositing().md)
