Skip to content

Commit

Permalink
colors: Switch to public APIs for colors
Browse files Browse the repository at this point in the history
Signed-off-by: Aayush Gupta <[email protected]>
  • Loading branch information
theimpulson committed Oct 9, 2023
1 parent 3938549 commit ecb5962
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="accent">@*android:color/accent_device_default_light</color>
<color name="primary">@*android:color/primary_device_default_settings_light</color>
<color name="primaryDark">@*android:color/primary_dark_device_default_settings_light</color>
<color name="background">@*android:color/background_device_default_light</color>
<color name="actionBarPrimary">@*android:color/primary_device_default_light</color>
<color name="statusBarColor">@*android:color/primary_device_default_settings_light
</color>
<color name="red">@*android:color/error_color_device_default_dark</color>
<color name="ic_launcher_background">@*android:color/accent_device_default_light</color>
<!-- AOSP colors -->
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#35 -->
<color name="accent">@android:color/system_accent1_600</color>
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#23 -->
<color name="primary">@android:color/system_neutral1_50</color>
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#27 -->
<color name="primaryDark">@color/primary</color>
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#52 -->
<color name="background">@android:color/system_neutral1_50</color>
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#21 -->
<color name="actionBarPrimary">@color/primary</color>
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#23 -->
<color name="statusBarColor">@color/primary</color>
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#69 -->
<!-- private resource, access it from colorError attribute instead -->
<color name="red">?android:attr/colorError</color>
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#35 -->
<color name="ic_launcher_background">@color/accent</color>

<!-- Custom colors -->
<color name="divider">#20ffffff</color>
<color name="green">#558B2F</color>
<color name="yellow">#F9A825</color>
Expand Down

0 comments on commit ecb5962

Please sign in to comment.