ColorResolved

A concrete color value.

StructureiOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+Color.Resolved in SwiftUI

Declaration

React
type ColorResolved = { colorSpace?: ColorRGBColorSpace; red: number; green: number; blue: number; opacity?: number; };
Swift
@frozen struct Resolved

Properties

  • red*number

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

  • green*number

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

  • blue*number

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

  • opacitynumber

    The degree of opacity in the color, given in the range 0 to 1.

Overview

Color.Resolved is a set of RGBA values that represent a color that can be shown. The values are stored in the Linear sRGB color space, using extended range. This is a low-level type, most colors are represented by the Color type.

From Apple’s SwiftUI documentation. Code samples there are Swift.

Used by

See also

More in Appearance.