Added proper transitions

This commit is contained in:
Prathamesh More 2021-11-11 20:59:28 +05:30
parent bc146d8b11
commit 30282e79fe
14 changed files with 48 additions and 95 deletions

View file

@ -227,5 +227,12 @@ fun Context.getColorCompat(@ColorRes colorRes: Int): Int {
@ColorInt
fun Context.darkAccentColor(): Int {
return ColorUtils.blendARGB(accentColor(), surfaceColor(), 0.975f)
return ColorUtils.blendARGB(
accentColor(),
surfaceColor(),
if (surfaceColor().isColorLight) 0.96f else 0.975f
)
}
inline val @receiver:ColorInt Int.isColorLight
get() = ColorUtil.isColorLight(this)