forked from noahsark769/ColorCompatibility
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColorCompatibility.swift
More file actions
202 lines (201 loc) · 7.3 KB
/
ColorCompatibility.swift
File metadata and controls
202 lines (201 loc) · 7.3 KB
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
import UIKit
public enum ColorCompatibility {
public static var label: UIColor {
if #available(iOS 13, *) {
return .label
}
return UIColor(red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0)
}
public static var secondaryLabel: UIColor {
if #available(iOS 13, *) {
return .secondaryLabel
}
return UIColor(red: 0.23529411764705882, green: 0.23529411764705882, blue: 0.2627450980392157, alpha: 0.6)
}
public static var tertiaryLabel: UIColor {
if #available(iOS 13, *) {
return .tertiaryLabel
}
return UIColor(red: 0.23529411764705882, green: 0.23529411764705882, blue: 0.2627450980392157, alpha: 0.3)
}
public static var quaternaryLabel: UIColor {
if #available(iOS 13, *) {
return .quaternaryLabel
}
return UIColor(red: 0.23529411764705882, green: 0.23529411764705882, blue: 0.2627450980392157, alpha: 0.18)
}
public static var systemFill: UIColor {
if #available(iOS 13, *) {
return .systemFill
}
return UIColor(red: 0.47058823529411764, green: 0.47058823529411764, blue: 0.5019607843137255, alpha: 0.2)
}
public static var secondarySystemFill: UIColor {
if #available(iOS 13, *) {
return .secondarySystemFill
}
return UIColor(red: 0.47058823529411764, green: 0.47058823529411764, blue: 0.5019607843137255, alpha: 0.16)
}
public static var tertiarySystemFill: UIColor {
if #available(iOS 13, *) {
return .tertiarySystemFill
}
return UIColor(red: 0.4627450980392157, green: 0.4627450980392157, blue: 0.5019607843137255, alpha: 0.12)
}
public static var quaternarySystemFill: UIColor {
if #available(iOS 13, *) {
return .quaternarySystemFill
}
return UIColor(red: 0.4549019607843137, green: 0.4549019607843137, blue: 0.5019607843137255, alpha: 0.08)
}
public static var placeholderText: UIColor {
if #available(iOS 13, *) {
return .placeholderText
}
return UIColor(red: 0.23529411764705882, green: 0.23529411764705882, blue: 0.2627450980392157, alpha: 0.3)
}
public static var systemBackground: UIColor {
if #available(iOS 13, *) {
return .systemBackground
}
return UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
}
public static var secondarySystemBackground: UIColor {
if #available(iOS 13, *) {
return .secondarySystemBackground
}
return UIColor(red: 0.9490196078431372, green: 0.9490196078431372, blue: 0.9686274509803922, alpha: 1.0)
}
public static var tertiarySystemBackground: UIColor {
if #available(iOS 13, *) {
return .tertiarySystemBackground
}
return UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
}
public static var systemGroupedBackground: UIColor {
if #available(iOS 13, *) {
return .systemGroupedBackground
}
return UIColor(red: 0.9490196078431372, green: 0.9490196078431372, blue: 0.9686274509803922, alpha: 1.0)
}
public static var secondarySystemGroupedBackground: UIColor {
if #available(iOS 13, *) {
return .secondarySystemGroupedBackground
}
return UIColor(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
}
public static var tertiarySystemGroupedBackground: UIColor {
if #available(iOS 13, *) {
return .tertiarySystemGroupedBackground
}
return UIColor(red: 0.9490196078431372, green: 0.9490196078431372, blue: 0.9686274509803922, alpha: 1.0)
}
public static var separator: UIColor {
if #available(iOS 13, *) {
return .separator
}
return UIColor(red: 0.23529411764705882, green: 0.23529411764705882, blue: 0.2627450980392157, alpha: 0.29)
}
public static var opaqueSeparator: UIColor {
if #available(iOS 13, *) {
return .opaqueSeparator
}
return UIColor(red: 0.7764705882352941, green: 0.7764705882352941, blue: 0.7843137254901961, alpha: 1.0)
}
public static var link: UIColor {
if #available(iOS 13, *) {
return .link
}
return UIColor(red: 0.0, green: 0.47843137254901963, blue: 1.0, alpha: 1.0)
}
public static var systemBlue: UIColor {
if #available(iOS 13, *) {
return .systemBlue
}
return UIColor(red: 0.0, green: 0.4784313725, blue: 1.0, alpha: 1.0)
}
public static var systemGreen: UIColor {
if #available(iOS 13, *) {
return .systemGreen
}
return UIColor(red: 0.2039215686, green: 0.7803921569, blue: 0.3490196078, alpha: 1.0)
}
public static var systemIndigo: UIColor {
if #available(iOS 13, *) {
return .systemIndigo
}
return UIColor(red: 0.34509803921568627, green: 0.33725490196078434, blue: 0.8392156862745098, alpha: 1.0)
}
public static var systemOrange: UIColor {
if #available(iOS 13, *) {
return .systemOrange
}
return UIColor(red: 1.0, green: 0.5843137255, blue: 0.0, alpha: 1.0)
}
public static var systemPink: UIColor {
if #available(iOS 13, *) {
return .systemPink
}
return UIColor(red: 1.0, green: 0.1764705882, blue: 0.3333333333, alpha: 1.0)
}
public static var systemPurple: UIColor {
if #available(iOS 13, *) {
return .systemPurple
}
return UIColor(red: 0.6862745098, green: 0.3215686275, blue: 0.8705882353, alpha: 1.0)
}
public static var systemRed: UIColor {
if #available(iOS 13, *) {
return .systemRed
}
return UIColor(red: 1.0, green: 0.231372549, blue: 0.1882352941, alpha: 1.0)
}
public static var systemTeal: UIColor {
if #available(iOS 13, *) {
return .systemTeal
}
return UIColor(red: 0.3529411765, green: 0.7843137255, blue: 0.9803921569, alpha: 1.0)
}
public static var systemYellow: UIColor {
if #available(iOS 13, *) {
return .systemYellow
}
return UIColor(red: 1.0, green: 0.8, blue: 0.0, alpha: 1.0)
}
public static var systemGray: UIColor {
if #available(iOS 13, *) {
return .systemGray
}
return UIColor(red: 0.5568627451, green: 0.5568627451, blue: 0.5568627451, alpha: 1.0)
}
public static var systemGray2: UIColor {
if #available(iOS 13, *) {
return .systemGray2
}
return UIColor(red: 0.6823529411764706, green: 0.6823529411764706, blue: 0.6980392156862745, alpha: 1.0)
}
public static var systemGray3: UIColor {
if #available(iOS 13, *) {
return .systemGray3
}
return UIColor(red: 0.7803921568627451, green: 0.7803921568627451, blue: 0.8, alpha: 1.0)
}
public static var systemGray4: UIColor {
if #available(iOS 13, *) {
return .systemGray4
}
return UIColor(red: 0.8196078431372549, green: 0.8196078431372549, blue: 0.8392156862745098, alpha: 1.0)
}
public static var systemGray5: UIColor {
if #available(iOS 13, *) {
return .systemGray5
}
return UIColor(red: 0.8980392156862745, green: 0.8980392156862745, blue: 0.9176470588235294, alpha: 1.0)
}
public static var systemGray6: UIColor {
if #available(iOS 13, *) {
return .systemGray6
}
return UIColor(red: 0.9490196078431372, green: 0.9490196078431372, blue: 0.9686274509803922, alpha: 1.0)
}
}