diff --git a/composeApp/src/commonMain/kotlin/com/pixelized/desktop/lwa/ui/screen/campaign/player/ribbon/PlayerPortrait.kt b/composeApp/src/commonMain/kotlin/com/pixelized/desktop/lwa/ui/screen/campaign/player/ribbon/PlayerPortrait.kt index 5762517..d4e0688 100644 --- a/composeApp/src/commonMain/kotlin/com/pixelized/desktop/lwa/ui/screen/campaign/player/ribbon/PlayerPortrait.kt +++ b/composeApp/src/commonMain/kotlin/com/pixelized/desktop/lwa/ui/screen/campaign/player/ribbon/PlayerPortrait.kt @@ -2,6 +2,7 @@ package com.pixelized.desktop.lwa.ui.screen.campaign.player.ribbon import androidx.compose.animation.AnimatedContent import androidx.compose.animation.AnimatedVisibility +import androidx.compose.animation.animateColorAsState import androidx.compose.animation.core.EaseOutCirc import androidx.compose.animation.core.animateFloatAsState import androidx.compose.animation.core.tween @@ -183,10 +184,13 @@ private fun BloodOverlay( targetValue = min(maxHp, max(0f, (maxHp - hp) / maxHp)), animationSpec = tween(durationMillis = 350, easing = EaseOutCirc) ) + val animatedColor = animateColorAsState( + targetValue = bloodColor.copy(alpha = ((maxHp - hp) / maxHp) / 4f + .25f) + ) Box( modifier = modifier .fillMaxWidth() .fillMaxHeight(fraction = animatedRatio.value) - .background(color = bloodColor) + .background(color = animatedColor.value) ) } \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/com/pixelized/desktop/lwa/ui/theme/color/LwaColors.kt b/composeApp/src/commonMain/kotlin/com/pixelized/desktop/lwa/ui/theme/color/LwaColors.kt index 5fd478f..d1b1a24 100644 --- a/composeApp/src/commonMain/kotlin/com/pixelized/desktop/lwa/ui/theme/color/LwaColors.kt +++ b/composeApp/src/commonMain/kotlin/com/pixelized/desktop/lwa/ui/theme/color/LwaColors.kt @@ -83,7 +83,7 @@ fun darkLwaColorTheme( ), portrait: LwaColors.Portrait = LwaColors.Portrait( levelUp = LwaColorPalette.Gold, - blood = LwaColorPalette.Blood.copy(alpha = .25f), + blood = LwaColorPalette.Blood, ), chat: LwaColors.Chat = LwaColors.Chat( timestamp = base.secondary,