Instance Property インスタンスプロパティ

cgColor

A Core Graphics representation of the color, if available.

Declaration 宣言

var cgColor: CGColor? { get }

Discussion 議論

You can get a CGColor instance from a constant SwiftUI color. This includes colors you create from a Core Graphics color, from RGB or HSB components, or from constant UIKit and AppKit colors.

For a dynamic color, like one you load from an Asset Catalog using init(_:bundle:), or one you create from a dynamic UIKit or AppKit color, this property is nil.

See Also 参照

Creating a Color from Another Color