Using better readable colors for amount from Tailwind color palette

This commit is contained in:
dankito 2024-08-25 03:28:55 +02:00
parent a7731091be
commit 8bfd50e0c0
2 changed files with 13 additions and 2 deletions

View File

@ -11,4 +11,15 @@ object Colors {
val Zinc700 = Color(63, 63, 70)
val Red600 = Color(220, 38, 38)
val Green600 = Color(22, 163, 74)
val Green700 = Color(21, 128, 61)
val Emerald700 = Color(4, 120, 87)
}

View File

@ -44,8 +44,8 @@ class FormatUtil {
}
fun getColorForAmount(amount: Amount): Color = when {
amount.amount.startsWith("-") -> Color.Red
else -> Color.Green
amount.amount.startsWith("-") -> Colors.Red600
else -> Colors.Green600
}