diff options
author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-03-11 16:28:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-11 16:28:59 +0100 |
commit | 5b53cc7bda66be5f740749f9fd0cba23927c4d82 (patch) | |
tree | 429d423dbe3e4dec775f6894df810fba9c132bfc /src/main/java/at/hannibal2/skyhanni/utils | |
parent | 9637398e94e41a1bb8787d2ef5bce6b839606b57 (diff) | |
download | skyhanni-5b53cc7bda66be5f740749f9fd0cba23927c4d82.tar.gz skyhanni-5b53cc7bda66be5f740749f9fd0cba23927c4d82.tar.bz2 skyhanni-5b53cc7bda66be5f740749f9fd0cba23927c4d82.zip |
Backend: RenderEntityLiving performance fix (#1127)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt | 5 |
1 files changed, 4 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 36263195d..d1962d140 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt @@ -3,7 +3,6 @@ package at.hannibal2.skyhanni.utils import java.awt.Color import kotlin.math.max - object ColorUtils { /** transfer string colors from the config to java.awt.Color */ @@ -30,4 +29,8 @@ object ColorUtils { alpha ) } + + fun Color.withAlpha(alpha: Int): Int = (alpha.coerceIn(0, 255) shl 24) or (this.rgb and 0x00ffffff) } + + |