Different md3 accent color for light and dark mode

This commit is contained in:
Prathamesh More 2021-09-20 10:53:33 +05:30
parent 93cc50a0c3
commit 1061fe8bfc
3 changed files with 9 additions and 2 deletions

View file

@ -6,7 +6,6 @@ import android.graphics.Color
import androidx.annotation.*
import androidx.annotation.IntRange
import androidx.core.content.ContextCompat
import androidx.core.content.res.ResourcesCompat
import code.name.monkey.appthemehelper.util.ATHUtil.isWindowBackgroundDark
import code.name.monkey.appthemehelper.util.ATHUtil.resolveColor
import code.name.monkey.appthemehelper.util.ColorUtil
@ -207,7 +206,7 @@ private constructor(private val mContext: Context) : ThemeStorePrefKeys, ThemeSt
@ColorInt
fun accentColor(context: Context): Int {
if (VersionUtils.hasS()) {
return ContextCompat.getColor(context, android.R.color.system_accent1_600)
return ContextCompat.getColor(context, R.color.m3_accent_color)
}
val desaturatedColor = prefs(context).getBoolean("desaturated_color", false)
val color = prefs(context).getInt(

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="m3_accent_color">@android:color/system_accent1_200</color>
</resources>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="m3_accent_color">@android:color/system_accent1_600</color>
</resources>