Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

colors: Switch to public APIs for colors #578

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions app/src/main/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="accent">@*android:color/accent_device_default_dark</color>
<color name="primary">@*android:color/primary_device_default_settings</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#36 -->
<color name="accent">@android:color/system_accent1_100</color>
<!-- https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-14.0.0_r1/core/res/res/values/colors_device_defaults.xml#22 -->
<color name="primary">@android:color/system_neutral1_900</color>

<!-- Custom colors -->
<color name="primaryDark">@android:color/black</color>
<color name="background">@color/primaryDark</color>
<color name="actionBarPrimary">@color/background</color>
<color name="statusBarColor">@android:color/transparent</color>
<color name="red">@*android:color/error_color_device_default_dark</color>
</resources>
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>
theimpulson marked this conversation as resolved.
Show resolved Hide resolved
<!-- 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