Color
public struct Color : View
extension Color: Renderable
A view that represents a color.
By default, a Color that is directly rendered in a view hierarchy
will expand both horizontally and vertically infinitely as much as
its parent view allows it to.
-
Declaration
Swift
public var viewStore: ViewValues -
Declaration
Swift
public init(white: Double, opacity: Double = 1) -
Declaration
Swift
public init(red: Double, green: Double, blue: Double, opacity: Double = 1) -
Declaration
Swift
public init(_ name: String, bundle: Bundle? = nil) -
Declaration
Swift
public init(_ uicolor: UIColor) -
The opacity of the color. Applying opacity on top of a color that already contains an alpha channel, will multiply the color’s alpha value.
Declaration
Swift
public func opacity(_ opacity: Double) -> Color -
Declaration
Swift
public var body: View { get } -
Declaration
Swift
public static let black: Color -
Declaration
Swift
public static let white: Color -
Declaration
Swift
public static let blue: Color -
Declaration
Swift
public static let red: Color -
Declaration
Swift
public static let yellow: Color -
Declaration
Swift
public static let green: Color -
Declaration
Swift
public static let orange: Color -
Declaration
Swift
public static let pink: Color -
Declaration
Swift
public static let purple: Color -
Declaration
Swift
public static let gray: Color -
Declaration
Swift
public static let clear: Color -
Color for primary content, ex: Texts
Declaration
Swift
public static var primary: Color { get } -
Color for secondary content, ex: Texts
Declaration
Swift
public static var secondary: Color { get } -
Declaration
Swift
public func createView(context: Context) -> UIView -
Declaration
Swift
public func updateView(_ view: UIView, context: Context)
View on GitHub
Color Structure Reference