mirror of
https://github.com/cmclark00/RetroMusicPlayer.git
synced 2025-05-19 16:45:20 +01:00
Fixed bottom navigation tint
This commit is contained in:
parent
50d56183a1
commit
e67c094320
2 changed files with 21 additions and 7 deletions
|
@ -244,9 +244,14 @@ fun Context.getColorCompat(@ColorRes colorRes: Int): Int {
|
|||
|
||||
@ColorInt
|
||||
fun Context.darkAccentColor(): Int {
|
||||
val colorSurfaceVariant = if (surfaceColor().isColorLight) {
|
||||
surfaceColor()
|
||||
} else {
|
||||
surfaceColor().lighterColor
|
||||
}
|
||||
return ColorUtils.blendARGB(
|
||||
accentColor(),
|
||||
surfaceColor(),
|
||||
colorSurfaceVariant,
|
||||
if (surfaceColor().isColorLight) 0.96f else 0.975f
|
||||
)
|
||||
}
|
||||
|
@ -262,3 +267,9 @@ fun Context.darkAccentColorVariant(): Int {
|
|||
|
||||
inline val @receiver:ColorInt Int.isColorLight
|
||||
get() = ColorUtil.isColorLight(this)
|
||||
|
||||
inline val @receiver:ColorInt Int.lighterColor
|
||||
get() = ColorUtil.lightenColor(this)
|
||||
|
||||
inline val @receiver:ColorInt Int.darkerColor
|
||||
get() = ColorUtil.darkenColor(this)
|
Loading…
Add table
Add a link
Reference in a new issue