Skip to content

Commit c1a69f5

Browse files
authored
Merge pull request #2726 from StoDevX/accent-colors
Accent colors!
2 parents 5e595ce + 0afc012 commit c1a69f5

File tree

20 files changed

+218
-64
lines changed

20 files changed

+218
-64
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
4+
<item name="android:windowLightStatusBar">true</item>
5+
<item name="colorPrimary">@color/colorPrimary</item>
6+
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
7+
<item name="colorAccent">@color/colorAccent</item>
8+
</style>
9+
</resources>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<!-- Change the color value for your needs -->
4+
<color name="colorAccent">@color/purple</color>
5+
6+
<!-- this is used (in our app) solely for the app switcher color -->
7+
<color name="colorPrimary">#FFC107</color>
8+
<!-- this is used when the app is starting to define the status bar color -->
9+
<color name="colorPrimaryDark">#C4C4C4</color>
10+
11+
<color name="black">#242121</color>
12+
<color name="darkGray">#53585A</color>
13+
<color name="mediumGray">#E0DAD6</color>
14+
<color name="lightGray">#F7F5F2</color>
15+
<color name="gold">#E3A025</color>
16+
<color name="lightGold">#F7C55A</color>
17+
<color name="cranberry">#B11556</color>
18+
<color name="lime">#A3D65C</color>
19+
<color name="orange">#FA8D29</color>
20+
<color name="red">#E84A36</color>
21+
<color name="lightBlue">#83DBE0</color>
22+
<color name="blue">#00ADD9</color>
23+
<color name="teal">#00827E</color>
24+
<color name="purple">#6E3A5D</color>
25+
<color name="navy">#233746</color>
26+
<color name="mint">#CFE1D7</color>
27+
<color name="white">#FFFFFF</color>
28+
</resources>

android/app/src/main/res/values/styles.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
<!-- Base application theme. -->
44
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
55
<!-- Customize your theme here. -->
6+
<item name="colorPrimary">@color/colorPrimary</item>
7+
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
8+
<item name="colorAccent">@color/colorAccent</item>
69
</style>
710

811
</resources>

ios/AllAboutOlaf/LaunchScreen.storyboard

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
<view opaque="NO" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="k1n-VD-D39">
2525
<rect key="frame" x="0.0" y="0.0" width="375" height="20"/>
2626
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
27-
<color key="backgroundColor" red="0.96862745100000003" green="0.74901960779999999" blue="0.0078431372550000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
28-
<color key="tintColor" red="0.96862745100000003" green="0.71372549019999998" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
27+
<color key="backgroundColor" red="0.89" green="0.627" blue="0.145" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
28+
<color key="tintColor" red="0.89" green="0.627" blue="0.145" alpha="1" colorSpace="calibratedRGB"/>
2929
</view>
3030
<navigationBar opaque="NO" contentMode="scaleToFill" fixedFrame="YES" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SV4-Lg-vZX">
3131
<rect key="frame" x="0.0" y="20" width="375" height="44"/>
3232
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
33-
<color key="tintColor" red="0.96862745100000003" green="0.71372549019999998" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
34-
<color key="barTintColor" red="0.96862745100000003" green="0.74901960779999999" blue="0.0078431372550000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
33+
<color key="tintColor" red="0.89" green="0.627" blue="0.145" alpha="1" colorSpace="calibratedRGB"/>
34+
<color key="barTintColor" red="0.89" green="0.627" blue="0.145" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
3535
<items>
3636
<navigationItem id="M41-5e-CfW"/>
3737
</items>

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
"sto-sis-time-parser": "2.3.3",
126126
"stream": "0.0.2",
127127
"timers": "0.1.1",
128+
"tinycolor2": "1.4.1",
128129
"titlecase": "1.1.2",
129130
"url": "0.11.0",
130131
"wordwrap": "1.0.0",

source/navigation.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,12 @@ import HelpView from './views/help'
4949

5050
const styles = StyleSheet.create({
5151
header: {
52-
backgroundColor: c.olevilleGold,
52+
backgroundColor: c.navigationBackground,
5353
},
5454
card: {
55-
...Platform.select({
56-
ios: {
57-
backgroundColor: c.iosLightBackground,
58-
},
59-
android: {
60-
backgroundColor: c.androidLightBackground,
61-
},
55+
backgroundColor: Platform.select({
56+
ios: c.iosLightBackground,
57+
android: c.androidLightBackground,
6258
}),
6359
},
6460
})
@@ -107,7 +103,7 @@ export const AppNavigator = createStackNavigator(
107103
{
108104
navigationOptions: {
109105
headerStyle: styles.header,
110-
headerTintColor: c.black,
106+
headerTintColor: c.navigationForeground,
111107
},
112108
cardStyle: styles.card,
113109
},

source/views/calendar/vertical-bar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ const dotBarStyles = StyleSheet.create({
1414
height: 5,
1515
width: 5,
1616
borderRadius: 5,
17-
backgroundColor: c.tint,
17+
backgroundColor: c.accent,
1818
},
1919
line: {
2020
width: 1,
21-
backgroundColor: c.tint,
21+
backgroundColor: c.accent,
2222
flex: 1,
2323
},
2424
})

source/views/components/__tests__/__snapshots__/button.test.js.snap

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ exports[`can change the title 1`] = `
5151
containerStyle={
5252
Object {
5353
"alignSelf": "center",
54-
"backgroundColor": "rgb(67, 114, 170)",
54+
"backgroundColor": "#E3A025",
5555
"borderRadius": 6,
5656
"marginVertical": 10,
5757
"overflow": "hidden",
@@ -69,7 +69,18 @@ exports[`can change the title 1`] = `
6969
style={
7070
Object {
7171
"backgroundColor": "transparent",
72-
"color": "#FFFFFF",
72+
"color": Object {
73+
"_a": 1,
74+
"_b": 33,
75+
"_format": "hex",
76+
"_g": 33,
77+
"_gradientType": undefined,
78+
"_ok": true,
79+
"_originalInput": "#242121",
80+
"_r": 36,
81+
"_roundA": 1,
82+
"_tc_id": 3,
83+
},
7384
"fontFamily": "System",
7485
"fontSize": 16,
7586
"fontWeight": "400",
@@ -92,7 +103,7 @@ exports[`renders 1`] = `
92103
containerStyle={
93104
Object {
94105
"alignSelf": "center",
95-
"backgroundColor": "rgb(67, 114, 170)",
106+
"backgroundColor": "#E3A025",
96107
"borderRadius": 6,
97108
"marginVertical": 10,
98109
"overflow": "hidden",
@@ -110,7 +121,18 @@ exports[`renders 1`] = `
110121
style={
111122
Object {
112123
"backgroundColor": "transparent",
113-
"color": "#FFFFFF",
124+
"color": Object {
125+
"_a": 1,
126+
"_b": 33,
127+
"_format": "hex",
128+
"_g": 33,
129+
"_gradientType": undefined,
130+
"_ok": true,
131+
"_originalInput": "#242121",
132+
"_r": 36,
133+
"_roundA": 1,
134+
"_tc_id": 3,
135+
},
114136
"fontFamily": "System",
115137
"fontSize": 16,
116138
"fontWeight": "400",

source/views/components/button.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as c from './colors'
99

1010
const styles = StyleSheet.create({
1111
button: {
12-
backgroundColor: c.denim,
12+
backgroundColor: c.buttonBackground,
1313
alignSelf: 'center',
1414
paddingVertical: 10,
1515
paddingHorizontal: 20,
@@ -25,6 +25,7 @@ const styles = StyleSheet.create({
2525
ios: iOSUIKit.calloutWhiteObject,
2626
android: material.buttonWhiteObject,
2727
}),
28+
color: c.buttonForeground,
2829
},
2930
textDisabled: {
3031
color: c.iosDisabledText,

source/views/components/cells/__tests__/__snapshots__/toggle.test.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ exports[`renders 1`] = `
99
cellAccessoryView={
1010
<Switch
1111
disabled={false}
12+
onTintColor="#E3A025"
1213
onValueChange={[Function]}
1314
value={true}
1415
/>
@@ -48,6 +49,7 @@ exports[`renders the given label into the Cell 1`] = `
4849
cellAccessoryView={
4950
<Switch
5051
disabled={false}
52+
onTintColor="#E3A025"
5153
onValueChange={[Function]}
5254
value={true}
5355
/>

0 commit comments

Comments
 (0)