init(_:selection:supportsOpacity:)
Creates a color picker with a text label generated from a title string resource.
Declaration
@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, selection: Binding<CGColor>, supportsOpacity: Bool = true)Parameters
- titleResource:
The localized title of the picker.
- selection:
A Binding to the variable that displays the selected
CGColor. - supportsOpacity:
A Boolean value that indicates whether the color picker allows adjustments to the selected color’s opacity; the default is
true.