One Logo Pool Ball
SwiftUICore · IOS API REFERENCE

Color.ResolvedHDR

struct · iOS 26.0+ · SDK 27.1

@frozen struct ResolvedHDR

A concrete color value, including HDR headroom information. `Color.ResolvedHDR` is a set of RGBA values that represent a color that can be shown. The color components are stored in the extended sRGB color space and may contain a "headroom" value describing how the color is rendered for displays with different dynamic ranges. This is a low-level type, most colors are represented by the `Color` type. - SeeAlso: `Color.Resolved`, `Color`.

Members (20)

get · iOS 26.0+

linearBlue

TypeScript
get linearBlue(): number
Swift declaration
@export(implementation) var linearBlue: Float { get set }

The amount of blue in the color in the extended sRGB color space variant with linear gamma.

set · iOS 26.0+

linearBlue

TypeScript
set linearBlue(value: number)
Swift declaration
@export(implementation) var linearBlue: Float { get set }

The amount of blue in the color in the extended sRGB color space variant with linear gamma.

get · iOS 26.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

get · iOS 26.0+

linearGreen

TypeScript
get linearGreen(): number
Swift declaration
@export(implementation) var linearGreen: Float { get set }

The amount of green in the color in the extended sRGB color space variant with linear gamma.

set · iOS 26.0+

linearGreen

TypeScript
set linearGreen(value: number)
Swift declaration
@export(implementation) var linearGreen: Float { get set }

The amount of green in the color in the extended sRGB color space variant with linear gamma.

get · iOS 26.0+

animatableData

TypeScript
get animatableData(): Color_ResolvedHDR_AnimatableData
Swift declaration
var animatableData: Color.ResolvedHDR.AnimatableData { get set }

The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.

set · iOS 26.0+

animatableData

TypeScript
set animatableData(value: Color_ResolvedHDR_AnimatableData)
Swift declaration
var animatableData: Color.ResolvedHDR.AnimatableData { get set }

The data to animate. SwiftUI reads this property to capture the current vector representation of the animatable state, and writes it back on each animation frame with an interpolated value. The default implementation returns ``EmptyAnimatableData``, meaning nothing is animated. Use the ``Animatable()`` macro to synthesize this property automatically. Implement it by hand only when you need custom interpolation logic such as clamping, normalization, or mapping to a derived value.

get · iOS 26.0+

red

TypeScript
get red(): number
Swift declaration
@export(implementation) var red: Float { get set }

The amount of red in the color in the extended sRGB color space.

set · iOS 26.0+

red

TypeScript
set red(value: number)
Swift declaration
@export(implementation) var red: Float { get set }

The amount of red in the color in the extended sRGB color space.

get · iOS 26.0+

blue

TypeScript
get blue(): number
Swift declaration
@export(implementation) var blue: Float { get set }

The amount of blue in the color in the extended sRGB color space.

set · iOS 26.0+

blue

TypeScript
set blue(value: number)
Swift declaration
@export(implementation) var blue: Float { get set }

The amount of blue in the color in the extended sRGB color space.

get · iOS 26.0+

green

TypeScript
get green(): number
Swift declaration
@export(implementation) var green: Float { get set }

The amount of green in the color in the extended sRGB color space.

set · iOS 26.0+

green

TypeScript
set green(value: number)
Swift declaration
@export(implementation) var green: Float { get set }

The amount of green in the color in the extended sRGB color space.

get · iOS 26.0+

opacity

TypeScript
get opacity(): number
Swift declaration
@export(implementation) var opacity: Float { get set }

The opacity of the color, in the range `0` to `1`. A value of `0` means 100% transparency, while a value of `1` means 100% opacity.

set · iOS 26.0+

opacity

TypeScript
set opacity(value: number)
Swift declaration
@export(implementation) var opacity: Float { get set }

The opacity of the color, in the range `0` to `1`. A value of `0` means 100% transparency, while a value of `1` means 100% opacity.

get · iOS 26.0+

headroom

TypeScript
get headroom(): (number) | null
Swift declaration
@export(implementation) var headroom: Float? { get set }

The content headroom of the color. This is the ratio of nominal peak luminance ("peak white") to nominal diffuse luminance ("reference white" or "diffuse white"). Headroom is a linear quantity, i.e. there is no gamma function applied to it.

set · iOS 26.0+

headroom

TypeScript
set headroom(value: (number) | null)
Swift declaration
@export(implementation) var headroom: Float? { get set }

The content headroom of the color. This is the ratio of nominal peak luminance ("peak white") to nominal diffuse luminance ("reference white" or "diffuse white"). Headroom is a linear quantity, i.e. there is no gamma function applied to it.

get · iOS 26.0+

linearRed

TypeScript
get linearRed(): number
Swift declaration
@export(implementation) var linearRed: Float { get set }

The amount of red in the color in the extended sRGB color space variant with linear gamma.

set · iOS 26.0+

linearRed

TypeScript
set linearRed(value: number)
Swift declaration
@export(implementation) var linearRed: Float { get set }

The amount of red in the color in the extended sRGB color space variant with linear gamma.

init · iOS 26.0+

init

TypeScript
static init(color: Color_Resolved, headroom?: (number) | null): Color_ResolvedHDR
Swift declaration
@export(implementation) init(_ color: Color.Resolved, headroom: Float? = nil)

Initializes a new resolved color value. - Parameters: - color: the resolved color to initialize from. - headroom: the optional content headroom of the color.

Skipped declarations

No declarations were skipped in this snapshot.

All SwiftUICore types →