---
title: "setRenderingIntent(_:)"
framework: coregraphics
role: symbol
role_heading: Instance Method
path: "coregraphics/cgcontext/setrenderingintent(_:)"
---

# setRenderingIntent(_:)

Sets the rendering intent in the current graphics state.

## Declaration

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

## Parameters

- `intent`: A rendering intent constant—doc://com.apple.coregraphics/documentation/CoreGraphics/CGColorRenderingIntent/defaultIntent, doc://com.apple.coregraphics/documentation/CoreGraphics/CGColorRenderingIntent/absoluteColorimetric, doc://com.apple.coregraphics/documentation/CoreGraphics/CGColorRenderingIntent/relativeColorimetric, doc://com.apple.coregraphics/documentation/CoreGraphics/CGColorRenderingIntent/perceptual, or doc://com.apple.coregraphics/documentation/CoreGraphics/CGColorRenderingIntent/saturation. For a discussion of these constants, see doc://com.apple.coregraphics/documentation/CoreGraphics/CGColorSpace.

## Discussion

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.

## See Also

### Managing a Graphics Context

- [flush()](coregraphics/cgcontext/flush().md)
- [synchronize()](coregraphics/cgcontext/synchronize().md)
- [setBlendMode(_:)](coregraphics/cgcontext/setblendmode(_:).md)
- [CGBlendMode](coregraphics/cgblendmode.md)
