Adds a luminance to alpha effect to this view.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
A view that applies a luminance to alpha effect to this view.
luminance modifier creates a semitransparent mask out of the view to which you apply it. The dark regions in a view become transparent, and the bright regions become opaque black. Medium brightness regions become a partially opaque gray color.
The example below shows two views: the first is a red square with an overlaid green circle; the second is a copy of the first view with where the
luminance modifier’s masking operation transforms the view’s brightness levels into an equivalent grayscale version of the first view.