---
title: ColorSchemeContrast
framework: swiftui
role: symbol
role_heading: Enumeration
path: swiftui/colorschemecontrast
---

# ColorSchemeContrast

The contrast between the app’s foreground and background colors.

## Declaration

```swift
enum ColorSchemeContrast
```

## Overview

Overview You receive a contrast value when you read the colorSchemeContrast environment value. The value tells you if a standard or increased contrast currently applies to the view. SwiftUI updates the value whenever the contrast changes, and redraws views that depend on the value. For example, the following Text view automatically updates when the user enables increased contrast: @Environment(\.colorSchemeContrast) private var colorSchemeContrast

var body: some View {     Text(colorSchemeContrast == .standard ? "Standard" : "Increased") } The user sets the contrast by selecting the Increase Contrast option in Accessibility > Display in System Preferences on macOS, or Accessibility > Display & Text Size in the Settings app on iOS. Your app can’t override the user’s choice. For information about using color and contrast in your app, see Accessibility in the Human Interface Guidelines.

## Topics

### Getting contrast options

- [ColorSchemeContrast.standard](swiftui/colorschemecontrast/standard.md)
- [ColorSchemeContrast.increased](swiftui/colorschemecontrast/increased.md)

### Creating a color scheme contrast

- [init(_:)](swiftui/colorschemecontrast/init(_:).md)

## Relationships

### Conforms To

- [CaseIterable](swift/caseiterable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Getting the color scheme contrast

- [colorSchemeContrast](swiftui/environmentvalues/colorschemecontrast.md)
