UIKit Content Background colors

The UIKit colors that are also used in other components like in List and GroupBox

UIKit Content Background colors - iOS Light Mode Preview

Platform Compatibility

iOS 13.0.+ iPadOS 13.0+ visionOS 1.0+

Tags

SwiftUI Code

Docs
VStack {
  List {
    Section {
      Text("content")
    }
  }
  .frame(maxHeight: 50)
  HStack {
    smallRect
    // can also be used as inverted text color
      .foregroundStyle(Color(.systemBackground))
    smallRect
    // GroupBox content backgroud
      .foregroundStyle(Color(.secondarySystemBackground))
    smallRect
      .foregroundStyle(Color(.tertiarySystemBackground))
    smallRect
    // can also be used as inverted text color
    // List background
      .foregroundStyle(Color(.systemGroupedBackground))
    smallRect
    // List content background
      .foregroundStyle(Color(.secondarySystemGroupedBackground))
    smallRect
      .foregroundStyle(Color(.tertiarySystemGroupedBackground))
  }
  GroupBox {
    Text("content")
  }
  .frame(maxHeight: 50)
}

Found an issue or have a suggestion?

Created: May 29, 2025Updated: May 29, 2025