Palette
struct Palette
All the Palettes have the same semantics for their colors
-
Name of the Palette
Declaration
Swift
let name: String
-
Color used for main backgrounds
Declaration
Swift
var backgroundMain: UIColor { get }
-
Color used for secondary backgrounds
Declaration
Swift
var backgroundMid: UIColor { get }
-
Color used for alternative backgrounds
Declaration
Swift
var backgroundAlt: UIColor { get }
-
Color used for primary texts
Declaration
Swift
var textPrimary: UIColor { get }
-
Color used for alternative texts
Declaration
Swift
var textAlt: UIColor { get }
-
Color used as primary in the app
Declaration
Swift
var primary: UIColor { get }
-
Color used as secondary in the app
Declaration
Swift
var secondary: UIColor { get }
-
Color used as tertiary in the app
Declaration
Swift
var tertiary: UIColor { get }
-
Collection of all the colors used in the app
Declaration
Swift
var allColors: [UIColor] { get }
-
Default Palette/Theme for the app
Declaration
Swift
static let `default`: UIColor.Palette
-
Alternative Theme, using non-standard colors for backgrounds/texts
Declaration
Swift
static let flashy: UIColor.Palette
-
Get the UIColor object from a string
Declaration
Swift
func assetCatalogColor(named semanticColor: ColorNames) -> UIColor
Parameters
semanticColor
color name (Should be one defined in the XCAssets)
Return Value
The color object