Sets the contrast and separation between similar colors in the view.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
Framework
- Swift
UI
Declaration
Parameters
amount
The intensity of color constrast to apply. Negative values invert colors in addition to applying contrast.
Return Value
A view that applies color contrast to this view.
Discussion
Apply contrast to a view when you want to increase or decrease the separation between similar colors in the view. The following image shows a photo next to that same photo with the contrast set to 3:
