Use white_100 for "On" colors

pull/935/head
Alex Baker 6 years ago
parent b8a6559197
commit 32bc8aac51

@ -154,7 +154,7 @@ public class ThemeColor implements Pickable {
this.colorPrimary = colorPrimary; this.colorPrimary = colorPrimary;
this.colorPrimaryVariant = ColorUtil.darken(colorPrimary, 12); this.colorPrimaryVariant = ColorUtil.darken(colorPrimary, 12);
int whiteText = context.getResources().getColor(R.color.white_87); int whiteText = context.getResources().getColor(R.color.white_100);
double contrast = ColorUtils.calculateContrast(whiteText, colorPrimary); double contrast = ColorUtils.calculateContrast(whiteText, colorPrimary);
this.isDark = contrast < 3; this.isDark = contrast < 3;
colorOnPrimary = isDark ? context.getResources().getColor(R.color.black_87) : whiteText; colorOnPrimary = isDark ? context.getResources().getColor(R.color.black_87) : whiteText;

@ -28,7 +28,7 @@
<style name="WhiteToolbarTheme"> <style name="WhiteToolbarTheme">
<item name="overlay_theme">@style/WhiteToolbarOverlay</item> <item name="overlay_theme">@style/WhiteToolbarOverlay</item>
<item name="colorOnPrimary">@color/white_87</item> <item name="colorOnPrimary">@color/white_100</item>
<item name="colorOnPrimaryHint">@color/white_60</item> <item name="colorOnPrimaryHint">@color/white_60</item>
<item name="android:actionOverflowButtonStyle">@style/WhiteOverflow</item> <item name="android:actionOverflowButtonStyle">@style/WhiteOverflow</item>
</style> </style>
@ -41,7 +41,7 @@
</style> </style>
<style name="WhiteTint"> <style name="WhiteTint">
<item name="colorOnSecondary">@color/white_87</item> <item name="colorOnSecondary">@color/white_100</item>
</style> </style>
<style name="BlackTint"> <style name="BlackTint">
@ -49,17 +49,17 @@
</style> </style>
<style name="WhiteOverflow" parent="Widget.AppCompat.Light.ActionButton.Overflow"> <style name="WhiteOverflow" parent="Widget.AppCompat.Light.ActionButton.Overflow">
<item name="android:tint">@color/white_87</item> <item name="android:tint">@color/white_100</item>
</style> </style>
<style name="BlackOverflow" parent="Widget.AppCompat.Light.ActionButton.Overflow"> <style name="BlackOverflow" parent="Widget.AppCompat.Light.ActionButton.Overflow">
<item name="android:tint">@color/black_87</item> <item name="android:tint">@color/black_100</item>
</style> </style>
<style name="WhiteToolbarOverlay" parent="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar"> <style name="WhiteToolbarOverlay" parent="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">
<item name="colorControlNormal">@color/white_87</item> <item name="colorControlNormal">@color/white_100</item>
<item name="android:textColorHint">@color/white_60</item> <item name="android:textColorHint">@color/white_60</item>
<item name="android:editTextColor">@color/white_87</item> <item name="android:editTextColor">@color/white_100</item>
</style> </style>
<style name="BlackToolbarOverlay" parent="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar"> <style name="BlackToolbarOverlay" parent="@style/ThemeOverlay.MaterialComponents.Dark.ActionBar">

Loading…
Cancel
Save