<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macOS: 26.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/SurroundingsEffect/dim(intensity:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI18SurroundingsEffectV3dim9intensityACSd_tFZ"
  },
  "title" : "dim(intensity:)"
}
-->

# dim(intensity:)

An effect that dims the passthrough video a custom amount.

```
static func dim(intensity: Double) -> SurroundingsEffect
```

## Discussion

Use this with the [`preferredSurroundingsEffect(_:)`](/documentation/SwiftUI/View/preferredSurroundingsEffect(_:))
view modifier when you want to darken the passthrough while displaying
a particular view. The value will be clamped between 0 and 1. This
effect will only be applied while an immersive space is opened.

---

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)