Skip to content

Commit 1918e55

Browse files
authored
Convert internal, static colors into color assets. (#1386)
* Add Assets.xcassets to MessageKitAssets.bundle * Replace incomingGray, outgoingGreen, inputBarGray * Replace playButtonLightGray, with UIVisualEffectView to mimic iMessage (Fixes #1321 , Fixes #1335) * Fixes an issue where the triangle in the play button is not centered * remove sendButtonBlue, add incoming/outgoingAudioMessageTint Matches audio tint more closely to iMessage by tinting white on outgoing and tinting blue on incoming * Remove backgroundColor, add collectionViewBackground * remove unused labelColor * Remove unused placeholderTextColor * Remove grayColor * remove darkTextColor, add typingIndicatorDot Matches dot color more closely to iMessage * Remove unused lightGrayColor * Adds high contrast appearances to the color assets * Add MessageKitError string for case when color asset could not be loaded Also removes redundant internal access level modifier on MessageKitError (internal is default), and changes MessageKitError from enum -> struct as its members were not enum cases * Fix swiftlint issues * Add label color asset and use in ContactMessageCell * Fix tests
1 parent afde0b1 commit 1918e55

31 files changed

Lines changed: 731 additions & 189 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"info" : {
3+
"author" : "xcode",
4+
"version" : 1
5+
}
6+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"platform" : "ios",
6+
"reference" : "systemGrayColor"
7+
},
8+
"idiom" : "universal"
9+
},
10+
{
11+
"appearances" : [
12+
{
13+
"appearance" : "luminosity",
14+
"value" : "dark"
15+
}
16+
],
17+
"color" : {
18+
"platform" : "ios",
19+
"reference" : "systemGrayColor"
20+
},
21+
"idiom" : "universal"
22+
}
23+
],
24+
"info" : {
25+
"author" : "xcode",
26+
"version" : 1
27+
}
28+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"platform" : "ios",
6+
"reference" : "systemBackgroundColor"
7+
},
8+
"idiom" : "universal"
9+
},
10+
{
11+
"appearances" : [
12+
{
13+
"appearance" : "luminosity",
14+
"value" : "dark"
15+
}
16+
],
17+
"color" : {
18+
"platform" : "ios",
19+
"reference" : "systemBackgroundColor"
20+
},
21+
"idiom" : "universal"
22+
},
23+
{
24+
"appearances" : [
25+
{
26+
"appearance" : "contrast",
27+
"value" : "high"
28+
}
29+
],
30+
"color" : {
31+
"platform" : "ios",
32+
"reference" : "systemBackgroundColor"
33+
},
34+
"idiom" : "universal"
35+
},
36+
{
37+
"appearances" : [
38+
{
39+
"appearance" : "luminosity",
40+
"value" : "dark"
41+
},
42+
{
43+
"appearance" : "contrast",
44+
"value" : "high"
45+
}
46+
],
47+
"color" : {
48+
"platform" : "ios",
49+
"reference" : "systemBackgroundColor"
50+
},
51+
"idiom" : "universal"
52+
}
53+
],
54+
"info" : {
55+
"author" : "xcode",
56+
"version" : 1
57+
}
58+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"platform" : "ios",
6+
"reference" : "systemBlueColor"
7+
},
8+
"idiom" : "universal"
9+
},
10+
{
11+
"appearances" : [
12+
{
13+
"appearance" : "luminosity",
14+
"value" : "dark"
15+
}
16+
],
17+
"color" : {
18+
"platform" : "ios",
19+
"reference" : "systemBlueColor"
20+
},
21+
"idiom" : "universal"
22+
},
23+
{
24+
"appearances" : [
25+
{
26+
"appearance" : "contrast",
27+
"value" : "high"
28+
}
29+
],
30+
"color" : {
31+
"platform" : "ios",
32+
"reference" : "systemBlueColor"
33+
},
34+
"idiom" : "universal"
35+
},
36+
{
37+
"appearances" : [
38+
{
39+
"appearance" : "luminosity",
40+
"value" : "dark"
41+
},
42+
{
43+
"appearance" : "contrast",
44+
"value" : "high"
45+
}
46+
],
47+
"color" : {
48+
"platform" : "ios",
49+
"reference" : "systemBlueColor"
50+
},
51+
"idiom" : "universal"
52+
}
53+
],
54+
"info" : {
55+
"author" : "xcode",
56+
"version" : 1
57+
}
58+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"platform" : "ios",
6+
"reference" : "systemGray5Color"
7+
},
8+
"idiom" : "universal"
9+
},
10+
{
11+
"appearances" : [
12+
{
13+
"appearance" : "luminosity",
14+
"value" : "dark"
15+
}
16+
],
17+
"color" : {
18+
"platform" : "ios",
19+
"reference" : "systemGray5Color"
20+
},
21+
"idiom" : "universal"
22+
},
23+
{
24+
"appearances" : [
25+
{
26+
"appearance" : "contrast",
27+
"value" : "high"
28+
}
29+
],
30+
"color" : {
31+
"platform" : "ios",
32+
"reference" : "systemGray5Color"
33+
},
34+
"idiom" : "universal"
35+
},
36+
{
37+
"appearances" : [
38+
{
39+
"appearance" : "luminosity",
40+
"value" : "dark"
41+
},
42+
{
43+
"appearance" : "contrast",
44+
"value" : "high"
45+
}
46+
],
47+
"color" : {
48+
"platform" : "ios",
49+
"reference" : "systemGray5Color"
50+
},
51+
"idiom" : "universal"
52+
}
53+
],
54+
"info" : {
55+
"author" : "xcode",
56+
"version" : 1
57+
}
58+
}
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"platform" : "ios",
6+
"reference" : "labelColor"
7+
},
8+
"idiom" : "universal"
9+
},
10+
{
11+
"appearances" : [
12+
{
13+
"appearance" : "luminosity",
14+
"value" : "dark"
15+
}
16+
],
17+
"color" : {
18+
"color-space" : "srgb",
19+
"components" : {
20+
"alpha" : "1.000",
21+
"blue" : "1.000",
22+
"green" : "1.000",
23+
"red" : "1.000"
24+
}
25+
},
26+
"idiom" : "universal"
27+
},
28+
{
29+
"appearances" : [
30+
{
31+
"appearance" : "contrast",
32+
"value" : "high"
33+
}
34+
],
35+
"color" : {
36+
"platform" : "ios",
37+
"reference" : "labelColor"
38+
},
39+
"idiom" : "universal"
40+
},
41+
{
42+
"appearances" : [
43+
{
44+
"appearance" : "luminosity",
45+
"value" : "dark"
46+
},
47+
{
48+
"appearance" : "contrast",
49+
"value" : "high"
50+
}
51+
],
52+
"color" : {
53+
"color-space" : "srgb",
54+
"components" : {
55+
"alpha" : "1.000",
56+
"blue" : "1.000",
57+
"green" : "1.000",
58+
"red" : "1.000"
59+
}
60+
},
61+
"idiom" : "universal"
62+
}
63+
],
64+
"info" : {
65+
"author" : "xcode",
66+
"version" : 1
67+
}
68+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"platform" : "ios",
6+
"reference" : "labelColor"
7+
},
8+
"idiom" : "universal"
9+
},
10+
{
11+
"appearances" : [
12+
{
13+
"appearance" : "luminosity",
14+
"value" : "dark"
15+
}
16+
],
17+
"color" : {
18+
"platform" : "ios",
19+
"reference" : "labelColor"
20+
},
21+
"idiom" : "universal"
22+
}
23+
],
24+
"info" : {
25+
"author" : "xcode",
26+
"version" : 1
27+
}
28+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"colors" : [
3+
{
4+
"color" : {
5+
"color-space" : "srgb",
6+
"components" : {
7+
"alpha" : "1.000",
8+
"blue" : "1.000",
9+
"green" : "1.000",
10+
"red" : "1.000"
11+
}
12+
},
13+
"idiom" : "universal"
14+
},
15+
{
16+
"appearances" : [
17+
{
18+
"appearance" : "luminosity",
19+
"value" : "dark"
20+
}
21+
],
22+
"color" : {
23+
"color-space" : "srgb",
24+
"components" : {
25+
"alpha" : "1.000",
26+
"blue" : "1.000",
27+
"green" : "1.000",
28+
"red" : "1.000"
29+
}
30+
},
31+
"idiom" : "universal"
32+
},
33+
{
34+
"appearances" : [
35+
{
36+
"appearance" : "contrast",
37+
"value" : "high"
38+
}
39+
],
40+
"color" : {
41+
"color-space" : "srgb",
42+
"components" : {
43+
"alpha" : "1.000",
44+
"blue" : "1.000",
45+
"green" : "1.000",
46+
"red" : "1.000"
47+
}
48+
},
49+
"idiom" : "universal"
50+
},
51+
{
52+
"appearances" : [
53+
{
54+
"appearance" : "luminosity",
55+
"value" : "dark"
56+
},
57+
{
58+
"appearance" : "contrast",
59+
"value" : "high"
60+
}
61+
],
62+
"color" : {
63+
"color-space" : "srgb",
64+
"components" : {
65+
"alpha" : "1.000",
66+
"blue" : "1.000",
67+
"green" : "1.000",
68+
"red" : "1.000"
69+
}
70+
},
71+
"idiom" : "universal"
72+
}
73+
],
74+
"info" : {
75+
"author" : "xcode",
76+
"version" : 1
77+
}
78+
}

0 commit comments

Comments
 (0)