From 84c3ca3e72a30b18fd012e1b9390d32a95ed70a1 Mon Sep 17 00:00:00 2001 From: Empa <42304516+ItsEmpa@users.noreply.github.com> Date: Thu, 13 Jun 2024 21:01:04 +0200 Subject: Improvement: Wardrobe Outline Color (#2079) * darken outline on other pages and dont show in empty slots Signed-off-by: Empa <42304516+ItsEmpa@users.noreply.github.com> * also locked Signed-off-by: Empa <42304516+ItsEmpa@users.noreply.github.com> * fix favorite button Signed-off-by: Empa <42304516+ItsEmpa@users.noreply.github.com> --------- Signed-off-by: Empa <42304516+ItsEmpa@users.noreply.github.com> --- src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/hannibal2/skyhanni/utils') diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt index ed0a9740e..1d95413fe 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt @@ -29,9 +29,11 @@ object ColorUtils { (red * factor).toInt().coerceIn(0, 255), (green * factor).toInt().coerceIn(0, 255), (blue * factor).toInt().coerceIn(0, 255), - alpha + alpha, ) + val TRANSPARENT_COLOR = Color(0, 0, 0, 0) + fun Color.withAlpha(alpha: Int): Int = (alpha.coerceIn(0, 255) shl 24) or (this.rgb and 0x00ffffff) fun Color.addAlpha(alpha: Int): Color = Color(red, green, blue, alpha) -- cgit