Skip to content
Flat UIColor swift extenstion
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

UIColor extension

Includes some Flat UI color schemes

This extension brings some convenience initializers into UIColor object and useful methods and calculated variables.

Create color with CSS hex string

let red = UIColor(string: "#FF0000")

Create color with hex integer representation

let green = UIColor(hex: 0x00FF00)

Convert color to hex integer representation

let hex =
// hex = 255

Convert color to CSS hex string representation

let string = UIColor.yellow.asHexString
// string = "#ffff00"

Make color lighter

let lightOrange =
// "#ff9f3f"

Make color darker

let darkOrange =
// "#bf5f00"

Flat UI colors

let greenSea = UIColor.flatGreenSea
let veryBerry = UIColor.flatVeryBerry


Add UIColor.swift into your project


You can’t perform that action at this time.