Color
public extension Color
Internal extension to allow color initialization from a hex string. This is kept internal to avoid polluting the public namespace of the consuming application.
-
Creates a color from a hex string.
Declaration
Swift
init(hex: String)Parameters
hexThe hex color string (e.g., “#RRGGBB” or “#AARRGGBB”). If the string is invalid, it returns a default color (black).
-
Undocumented
Declaration
Swift
func toHex(includeAlpha: Bool = false) -> String?