You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

112 lines
2.7 KiB

//
// UIColorExtension.swift
// GMERemittance
//
// Created by Fm-user on 2/2/18.
// Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
//
import UIKit
extension UIColor {
convenience init(hex: Int) {
let components = (
R: CGFloat((hex >> 16) & 0xff) / 255,
G: CGFloat((hex >> 08) & 0xff) / 255,
B: CGFloat((hex >> 00) & 0xff) / 255
)
self.init(red: components.R, green: components.G, blue: components.B, alpha: 1)
}
// origin: ed1b24 // vivid red: ff2727 // cherry tomato: E94B3C // coral red: ff4040
// UIColor(red:0.92, green:0.12, blue:0.18, alpha:1.0) // fiesta #dd1923
// #f04b4c
class var themeRed: UIColor {
return .init(hex: "#ed1b24")
}
// 2D368F // origin: 303e9f // princess blue: 00539C // nebulas blue: 3F69AA // galaxy blue: #2A4B7C
// UIColor(red:0.00, green:0.47, blue:0.76, alpha:1.0)
// #3d6098
class var themeBlue: UIColor {
return .init(hex: "#303e9f")
}
class var themeGreen: UIColor {
return .init(hex: "#08A384")
}
class var themeGray3: UIColor {
return UIColor(red:0.67, green:0.67, blue:0.67, alpha:1.0)
}
class var themeGray2: UIColor {
return UIColor(red:0.83, green:0.83, blue:0.83, alpha:1.0)
}
class var themeGray1: UIColor {
return UIColor(red:0.93, green:0.93, blue:0.93, alpha:1.0)
}
// #e7e7e7 // ffffff
class var themeWhite: UIColor {
return UIColor(named: "ThemeWhite") ?? .white
}
class var themeBlack: UIColor {
return UIColor(named: "ThemeBlack") ?? .black
}
class var themeMainBackground: UIColor {
return UIColor(named: "ThemeMainBackground") ?? .white
}
class var themeRedDark: UIColor {
return UIColor(named: "ThemeRedDark") ?? .white
}
class var themeWhiteRed: UIColor {
return UIColor(named: "ThemeWhiteRed") ?? .white
}
class var themeRedWhite: UIColor {
return UIColor(named: "ThemeRedWhite") ?? .white
}
class var themeSubBackground: UIColor {
return UIColor(named: "ThemeSubBackground") ?? .lightGray
}
class var themeText: UIColor {
return UIColor(named: "ThemeText") ?? .init(hex: "4A4A4A")
}
class var themeSeparate: UIColor {
return UIColor(named: "ThemeSeparate") ?? .init(hex: "4A4A4A")
}
class var themeDarkRed: UIColor {
return .init(hex: "#be0007")
}
class var themeBorderColor: UIColor {
return .init(red:0.91, green:0.93, blue:0.95, alpha:1.0)
}
class var themeTextColor: UIColor {
return .init(hex: "4A4A4A")
}
class var themeTitleTextColor: UIColor {
return .init(hex: "6E6E6E")
}
class var themeBackgroundColor: UIColor {
return .init(hex: "E7EDF2")
}
class var themeBackgroundGray: UIColor {
return UIColor.black.withAlphaComponent(0.5)
}
}