<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIFilter-swift.class/toneCurve()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilter(cm)toneCurveFilter"
  },
  "title" : "toneCurve()"
}
-->

# toneCurve()

Alters an image’s tone curve according to a series of data points.

```
class func toneCurve() -> any CIFilter & CIToneCurve
```

## Return Value

The modified image.

## Discussion

This method applies the tone curve filter to an image. The effect calculates the adjustment of the tone curve by the sum of the red, green, and blue color values with the point value properties specified.

The tone curve filter uses the following properties:

- `point0`: A v`ector` containing the position of the first point of the tone curve as a [`CIVector`](/documentation/CoreImage/CIVector).
- `point1`: A v`ector` containing the position of the second point of the tone curve as a [`CIVector`](/documentation/CoreImage/CIVector).
- `point2`: A `vector` containing the position of the third point of the tone curve as a [`CIVector`](/documentation/CoreImage/CIVector).
- `point3`: A v`ector` containing the position of the fourth point of the tone curve as a [`CIVector`](/documentation/CoreImage/CIVector).
- `point4`: A v`ector` containing the position of the fifth point of the tone curve as a [`CIVector`](/documentation/CoreImage/CIVector).
- `inputImage`: An image with the type [`CIImage`](/documentation/CoreImage/CIImage).

The following code creates a filter that adds brightness to the input image:

```swift
func toneCurve(inputImage: CIImage) -> CIImage {
    let toneCurveFilter = CIFilter.toneCurve()
    toneCurveFilter.inputImage = inputImage
    toneCurveFilter.point0 = CGPoint(x: 0, y: 0)
    toneCurveFilter.point1 = CGPoint(x: 0.22, y: 0.25)
    toneCurveFilter.point2 = CGPoint(x: 0.4, y: 0.5)
    toneCurveFilter.point3 = CGPoint(x: 0.65, y: 0.75)
    toneCurveFilter.point4 = CGPoint(x: 1, y: 1)
    return toneCurveFilter.outputImage!
}
```

![Two versions of a photograph side by side. The photo on the left shows a small bunch of flowers photographed close up, in focus, with good light and no effects. In the photo on the right, a tone curve filter is applied, resulting in a brighter image.](images/com.apple.coreimage/media-3545005@2x.png)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)