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

# smoothLinearGradient()

Generates a gradient that blends colors along a linear axis between two defined endpoints.

## Declaration

```swift
class func smoothLinearGradient() -> any CIFilter & CISmoothLinearGradient
```

## Return Value

Return Value The generated image.

## Discussion

Discussion This method generates a smooth linear-gradient image. The effect creates a gradient by gradually blending colors between point0 and point1 using the sigmoid curve function. The smooth linear-gradient filter uses the following properties: The following code creates a filter that generates a gradient image: func smoothLinear() -> CIImage {     let smoothLinearGradient = CIFilter.smoothLinearGradient()     smoothLinearGradient.point0 = CGPoint(x: 0, y: 0)     smoothLinearGradient.point1 = CGPoint(x: 200, y: 200)     smoothLinearGradient.color0 = CIColor(red: 0/255, green: 112/255, blue: 201/255)     smoothLinearGradient.color1 = CIColor(red: 216/255, green: 232/255, blue: 146/255)     return smoothLinearGradient.outputImage! }

## See Also

### Filters

- [gaussianGradient()](coreimage/cifilter-swift.class/gaussiangradient().md)
- [hueSaturationValueGradient()](coreimage/cifilter-swift.class/huesaturationvaluegradient().md)
- [linearGradient()](coreimage/cifilter-swift.class/lineargradient().md)
- [radialGradient()](coreimage/cifilter-swift.class/radialgradient().md)
