summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorEmpa <42304516+ItsEmpa@users.noreply.github.com>2024-06-13 21:01:04 +0200
committerGitHub <noreply@github.com>2024-06-13 21:01:04 +0200
commit84c3ca3e72a30b18fd012e1b9390d32a95ed70a1 (patch)
tree7cf1efe4561c7ba9819f93b6b812c0f5038e75b8 /src/main/java/at/hannibal2/skyhanni/utils
parent1d35ee709c4a0876fbc8e814d959659b37710ce8 (diff)
downloadskyhanni-84c3ca3e72a30b18fd012e1b9390d32a95ed70a1.tar.gz
skyhanni-84c3ca3e72a30b18fd012e1b9390d32a95ed70a1.tar.bz2
skyhanni-84c3ca3e72a30b18fd012e1b9390d32a95ed70a1.zip
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>
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt4
1 files changed, 3 insertions, 1 deletions
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)