From 482f05ba3eec543cf619675c59a4f925c5448971 Mon Sep 17 00:00:00 2001 From: Lucas Dupin Date: Mon, 28 Dec 2020 13:28:16 -0800 Subject: [PATCH] Expose Material Design system palette Make system dominant and accent colors available to apps in multiple shades ranging from 0 to 1000. Also point system colors to the new palette on Theme.DeviceDefault Fixes: 173628800 Test: atest SystemPalette Test: manual Change-Id: Ib9c3bbbb9e381bfc3a98788c33041dad4135d815 --- core/api/current.txt | 24 ++++++ core/res/res/values/colors.xml | 74 +++++++++++++++++++ .../res/res/values/colors_device_defaults.xml | 12 +-- core/res/res/values/public.xml | 28 +++++++ 4 files changed, 132 insertions(+), 6 deletions(-) diff --git a/core/api/current.txt b/core/api/current.txt index a95ce8b59197d..eb667e60ab5cf 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -1686,6 +1686,30 @@ package android { field @Deprecated public static final int secondary_text_dark_nodisable = 17170438; // 0x1060006 field @Deprecated public static final int secondary_text_light = 17170439; // 0x1060007 field @Deprecated public static final int secondary_text_light_nodisable = 17170440; // 0x1060008 + field public static final int system_accent_0 = 17170473; // 0x1060029 + field public static final int system_accent_100 = 17170475; // 0x106002b + field public static final int system_accent_1000 = 17170484; // 0x1060034 + field public static final int system_accent_200 = 17170476; // 0x106002c + field public static final int system_accent_300 = 17170477; // 0x106002d + field public static final int system_accent_400 = 17170478; // 0x106002e + field public static final int system_accent_50 = 17170474; // 0x106002a + field public static final int system_accent_500 = 17170479; // 0x106002f + field public static final int system_accent_600 = 17170480; // 0x1060030 + field public static final int system_accent_700 = 17170481; // 0x1060031 + field public static final int system_accent_800 = 17170482; // 0x1060032 + field public static final int system_accent_900 = 17170483; // 0x1060033 + field public static final int system_main_0 = 17170461; // 0x106001d + field public static final int system_main_100 = 17170463; // 0x106001f + field public static final int system_main_1000 = 17170472; // 0x1060028 + field public static final int system_main_200 = 17170464; // 0x1060020 + field public static final int system_main_300 = 17170465; // 0x1060021 + field public static final int system_main_400 = 17170466; // 0x1060022 + field public static final int system_main_50 = 17170462; // 0x106001e + field public static final int system_main_500 = 17170467; // 0x1060023 + field public static final int system_main_600 = 17170468; // 0x1060024 + field public static final int system_main_700 = 17170469; // 0x1060025 + field public static final int system_main_800 = 17170470; // 0x1060026 + field public static final int system_main_900 = 17170471; // 0x1060027 field public static final int tab_indicator_text = 17170441; // 0x1060009 field @Deprecated public static final int tertiary_text_dark = 17170448; // 0x1060010 field @Deprecated public static final int tertiary_text_light = 17170449; // 0x1060011 diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml index 110e77a8aa053..89407763a9b61 100644 --- a/core/res/res/values/colors.xml +++ b/core/res/res/values/colors.xml @@ -234,4 +234,78 @@ #1A73E8 #F9AB00 + + + #ffffff + + #ebf1f8 + + #dde3ea + + #c1c7cd + + #a6acb2 + + #8b9197 + + #72787d + + #595f64 + + #42474d + + #2c3136 + + #171c21 + + #000000 + + + #ffffff + + #91fff4 + + #83f6e5 + + #65d9c9 + + #45bdae + + #1fa293 + + #00877a + + #006d61 + + #005449 + + #003c33 + + #00271e + + #000000 diff --git a/core/res/res/values/colors_device_defaults.xml b/core/res/res/values/colors_device_defaults.xml index 310ca893ac391..b5580879d3284 100644 --- a/core/res/res/values/colors_device_defaults.xml +++ b/core/res/res/values/colors_device_defaults.xml @@ -33,14 +33,14 @@ @color/tertiary_material_settings @color/quaternary_material_settings - @color/accent_material_light - @color/accent_material_dark + @color/system_accent_500 + @color/system_accent_200 @color/accent_device_default_light - #1A1A1A - #F2F2F2 - #0D0D0D - #CCCCCC + @color/system_main_900 + @color/system_main_100 + @color/system_main_800 + @color/system_main_200 @color/error_color_material_dark diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 095843467f9ba..a50ceba3563c4 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -3058,6 +3058,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +