exposureAdjust

Returns a new color with an exposure adjustment applied.

Color ModifieriOS 26.0+macOS 26.0+tvOS 26.0+watchOS 26.0+visionOS 26.0+exposureAdjust(_:) in SwiftUI

Declaration

React
compose().exposureAdjust(stops: number)
Swift
@export(implementation) func exposureAdjust(_ stops: Double) -> Color

Parameters

  • stops*number

    the number of exposure levels to adjust by.

Return value

a new color with the exposure adjustment applied.

Discussion

This function adjusts the exposure of a color by multipling its linear-light representation by pow(2, stops) and adjusting its HDR content headroom.

For example the system yellow color could have its brightness increased by two exposure levels:

Color.yellow.exposureAdjust(2)

See also

More in Color modifiers.