---
title: "allowedDynamicRange(_:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/alloweddynamicrange(_:)"
---

# allowedDynamicRange(_:)

Returns a new view configured with the specified allowed dynamic range.

## Declaration

```swift
nonisolated func allowedDynamicRange(_ range: Image.DynamicRange?) -> some View

```

## Parameters

- `range`: The requested dynamic range, or nil to restore the default allowed range.

## Return Value

Return Value A new view.

## Discussion

Discussion The following example enables HDR rendering within a view hierarchy: MyView().allowedDynamicRange(.high)

## See Also

### Colors and patterns

- [backgroundStyle(_:)](swiftui/view/backgroundstyle(_:).md)
- [foregroundStyle(_:)](swiftui/view/foregroundstyle(_:).md)
- [foregroundStyle(_:_:)](swiftui/view/foregroundstyle(_:_:).md)
- [foregroundStyle(_:_:_:)](swiftui/view/foregroundstyle(_:_:_:).md)
