Color
public extension Color
-
Extension to
Color, to return colors from the latest version of preset color palette used byThemeManager.Declaration
Swift
static func preferredColor(_ style: ColorStyle, background scheme: BackgroundColorScheme? = .device, interface level: InterfaceLevel? = .device, display mode: ColorDisplayMode? = .device) -> ColorParameters
styleColorStyleenum from the color palette.schemespecifies whether the color should be used in front of a light background, or a dark background. E.g. a “white” background is a “light” background. A “dark blue” background is a “dark” background. Defaults to
.device.levelspecifies whether the color should be used in the base or elevated level of the interface. E.g. alerts and popovers will be assigned with the elevated interface level. Defaults to
.device.Return Value
a dynamic color provider wrapped in
Color -
Extension to
Color, to resolve a static form ofColorfrom the wrapped dynamic color provider.Declaration
Swift
func resolvedColor(with scheme: ColorScheme? = .light, in level: UIUserInterfaceLevel? = .base) -> ColorParameters
schemespecifies whether the color should be used in front of a light background, or a dark background. Defaults to
.light.levelspecifies whether the color should be used in the base or elevated level of the interface. Defaults to
.base.Return Value
a static form of
Colorresolved from the dynamic color provider. -
Undocumented
Declaration
Swift
func uiColor() -> UIColor