Created
April 10, 2017 23:32
-
-
Save guoc/4731bd0fd1e5ac74ed64425f05d5f949 to your computer and use it in GitHub Desktop.
UIColor (Solarized)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIColor { | |
struct Solarized { // 20170411 from http://ethanschoonover.com/solarized | |
private init() {} | |
static let base03 = UIColor(red: 0/255, green: 43/255, blue: 54/255, alpha: 1.0) | |
static let base02 = UIColor(red: 7/255, green: 54/255, blue: 66/255, alpha: 1.0) | |
static let base01 = UIColor(red: 88/255, green: 110/255, blue: 117/255, alpha: 1.0) | |
static let base00 = UIColor(red: 101/255, green: 123/255, blue: 131/255, alpha: 1.0) | |
static let base0 = UIColor(red: 131/255, green: 148/255, blue: 150/255, alpha: 1.0) | |
static let base1 = UIColor(red: 147/255, green: 161/255, blue: 161/255, alpha: 1.0) | |
static let base2 = UIColor(red: 238/255, green: 232/255, blue: 213/255, alpha: 1.0) | |
static let base3 = UIColor(red: 253/255, green: 246/255, blue: 227/255, alpha: 1.0) | |
static let yellow = UIColor(red: 181/255, green: 137/255, blue: 0/255, alpha: 1.0) | |
static let orange = UIColor(red: 203/255, green: 75/255, blue: 22/255, alpha: 1.0) | |
static let red = UIColor(red: 220/255, green: 50/255, blue: 47/255, alpha: 1.0) | |
static let magenta = UIColor(red: 211/255, green: 54/255, blue: 130/255, alpha: 1.0) | |
static let violet = UIColor(red: 108/255, green: 113/255, blue: 196/255, alpha: 1.0) | |
static let blue = UIColor(red: 38/255, green: 139/255, blue: 210/255, alpha: 1.0) | |
static let cyan = UIColor(red: 42/255, green: 161/255, blue: 152/255, alpha: 1.0) | |
static let green = UIColor(red: 133/255, green: 153/255, blue: 0/255, alpha: 1.0) | |
struct Light { | |
private init() {} | |
static let optionalEmphasizedContent = UIColor.Solarized.base01 | |
static let bodyText = UIColor.Solarized.base00 | |
static let defaultColor = UIColor.Solarized.base00 | |
static let primaryContent = UIColor.Solarized.base00 | |
static let comments = UIColor.Solarized.base1 | |
static let secondaryContent = UIColor.Solarized.base1 | |
static let backgroundHighlights = UIColor.Solarized.base2 | |
static let background = UIColor.Solarized.base3 | |
} | |
struct Dark { | |
private init() {} | |
static let optionalEmphasizedContent = UIColor.Solarized.base1 | |
static let bodyText = UIColor.Solarized.base0 | |
static let defaultColor = UIColor.Solarized.base0 | |
static let primaryContent = UIColor.Solarized.base0 | |
static let comments = UIColor.Solarized.base01 | |
static let secondaryContent = UIColor.Solarized.base01 | |
static let backgroundHighlights = UIColor.Solarized.base02 | |
static let background = UIColor.Solarized.base03 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment