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.

59 lines
1.4 KiB

6 years ago
6 years ago
  1. //
  2. // UIColorExtension.swift
  3. // GMERemittance
  4. //
  5. // Created by Fm-user on 2/2/18.
  6. // Copyright © 2018 Gobal Money Express Co. Ltd. All rights reserved.
  7. //
  8. import UIKit
  9. extension UIColor {
  10. convenience init(hex: Int) {
  11. let components = (
  12. R: CGFloat((hex >> 16) & 0xff) / 255,
  13. G: CGFloat((hex >> 08) & 0xff) / 255,
  14. B: CGFloat((hex >> 00) & 0xff) / 255
  15. )
  16. self.init(red: components.R, green: components.G, blue: components.B, alpha: 1)
  17. }
  18. // origin: ed1b24 // vivid red: ff2727 // cherry tomato: E94B3C // coral red: ff4040
  19. class var themeRed: UIColor {
  20. return .init(hex: "#ed1b24")
  21. }
  22. // 2D368F // origin: 303e9f // princess blue: 00539C // nebulas blue: 3F69AA // galaxy blue: #2A4B7C
  23. class var themeBlue: UIColor {
  24. return .init(hex: "#303e9f")
  25. }
  26. class var themeWhite: UIColor {
  27. return .init(hex: "#ffffff")
  28. }
  29. class var themeDarkRed: UIColor {
  30. return .init(hex: "#be0007")
  31. }
  32. class var themeBorderColor: UIColor {
  33. return .init(red:0.91, green:0.93, blue:0.95, alpha:1.0)
  34. }
  35. class var themeTextColor: UIColor {
  36. return .init(hex: "4A4A4A")
  37. }
  38. class var themeTitleTextColor: UIColor {
  39. return .init(hex: "6E6E6E")
  40. }
  41. class var themeBackgroundColor: UIColor {
  42. return .init(hex: "E7EDF2")
  43. }
  44. class var themeBackgroundGray: UIColor {
  45. return UIColor.black.withAlphaComponent(0.5)
  46. }
  47. }