๐Ÿ–ผ๏ธColor

// from Asset Catalog
let aqua = Color("aqua")

// RGB / HSL / grayscale
let skyBlue = Color(red: 0.46, green: 0.84, blue: 1.0)
let lemonYellow = Color(hue: 0.16, saturation: 1, brightness: 1)
let steelGray = Color(white: 0.47)

// from UIColor / NSColor:
#if os(iOS)
    let linkColor = Color(uiColor: .link)
#elseif os(macOS)
    let linkColor = Color(nsColor: .linkColor)
#endif

// predefined colors: 
[.black, .green, .purple]

Last updated