From bf9035bb2c141de7873f123da6769ce7b6bc0321 Mon Sep 17 00:00:00 2001 From: MM20 <15646950+MM2-0@users.noreply.github.com> Date: Wed, 23 Aug 2023 19:22:43 +0200 Subject: [PATCH] Convert colors to unsigned int before converting them to string --- data/themes/src/main/java/de/mm20/launcher2/themes/Theme.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/themes/src/main/java/de/mm20/launcher2/themes/Theme.kt b/data/themes/src/main/java/de/mm20/launcher2/themes/Theme.kt index d5377907..4c8ad761 100644 --- a/data/themes/src/main/java/de/mm20/launcher2/themes/Theme.kt +++ b/data/themes/src/main/java/de/mm20/launcher2/themes/Theme.kt @@ -59,14 +59,14 @@ data class ColorRef( val tone: Int, ) : Color { override fun toString(): String { - return "\$${color.toString()}.$tone" + return "\$$color.$tone" } } @JvmInline value class StaticColor(val color: Int) : Color { override fun toString(): String { - return "#${color.toString(16).padStart(6, '0')}" + return "#${color.toUInt().toString(16).padStart(8, '0')}" } }