<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.0.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGContext/setRenderingIntent(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Graphics",
      "CoreGraphics"
    ],
    "preciseIdentifier" : "c:@F@CGContextSetRenderingIntent"
  },
  "title" : "setRenderingIntent(_:)"
}
-->

# setRenderingIntent(_:)

Sets the rendering intent in the current graphics state.

```
func setRenderingIntent(_ intent: CGColorRenderingIntent)
```

## Parameters

`intent`

A rendering intent constant—[`CGColorRenderingIntent.defaultIntent`](/documentation/CoreGraphics/CGColorRenderingIntent/defaultIntent), [`CGColorRenderingIntent.absoluteColorimetric`](/documentation/CoreGraphics/CGColorRenderingIntent/absoluteColorimetric), [`CGColorRenderingIntent.relativeColorimetric`](/documentation/CoreGraphics/CGColorRenderingIntent/relativeColorimetric), [`CGColorRenderingIntent.perceptual`](/documentation/CoreGraphics/CGColorRenderingIntent/perceptual), or [`CGColorRenderingIntent.saturation`](/documentation/CoreGraphics/CGColorRenderingIntent/saturation). For a discussion of these constants, see [`CGColorSpace`](/documentation/CoreGraphics/CGColorSpace).

## Discussion

The rendering intent specifies how to handle colors that are not located within the gamut of the destination color space of a graphics context. If you do not explicitly set the rendering intent, Core Graphics uses perceptual rendering intent when drawing sampled images and relative colorimetric rendering intent for all other drawing.

---

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)