forked from RocketChat/Rocket.Chat.iOS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUIColor+hexValue.swift
69 lines (38 loc) · 1.56 KB
/
UIColor+hexValue.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
//
// UIColor+hexValue.swift
// Rocket.Chat.iOS
//
// Created by Kornelakis Michael on 9/2/15.
// Copyright © 2015 Rocket.Chat. All rights reserved.
//
import UIKit
extension UIColor {
//function to get colors using hex values
static func colorWithHexValue(redValue: CGFloat, greenValue: CGFloat, blueValue: CGFloat, alpha: CGFloat) -> UIColor {
return UIColor(red: redValue/255.0, green: greenValue/255.0, blue: blueValue/255.0, alpha: alpha)
}
// hex #444444
static func rocketMainFontColor() -> UIColor {
return UIColor(red: 68/255.0, green: 68/255.0, blue: 68/255.0, alpha: 1)
}
// hex #7F7F7F
static func rocketSecondaryFontColor() -> UIColor {
return UIColor(red: 127/255.0, green: 127/255.0, blue: 127/255.0, alpha: 1)
}
// hex #AAAAAA
static func rocketTimestampColor() -> UIColor {
return UIColor(red: 170/255, green: 170/255, blue: 170/255, alpha: 1)
}
// hex #C12623
static func rocketRedColor() -> UIColor {
return UIColor(red: 193/255.0, green: 38/255.0, blue: 35/255.0, alpha: 1)
}
// hex #044974
static func rocketBlueColor() -> UIColor {
return UIColor(red: 4/255.0, green: 73/255.0, blue: 116/255.0, alpha: 1)
}
// hex #04436A
static func rocketDarkBlueColor() -> UIColor {
return UIColor(red: 4/255.0, green: 67/255.0, blue: 106/255.0, alpha: 1)
}
}