summaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-04-01 21:17:32 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-04-01 21:17:32 +0200
commit737eac07340dbe2246c15418e8d6825ce5c2c29e (patch)
tree46e7ea258213126afcb5176e3c2ccb2df65da127 /src/main/java/at/hannibal2/skyhanni/utils
parent9d0f4deee109a05ebed657e1c578c78d7c19f863 (diff)
downloadskyhanni-737eac07340dbe2246c15418e8d6825ce5c2c29e.tar.gz
skyhanni-737eac07340dbe2246c15418e8d6825ce5c2c29e.tar.bz2
skyhanni-737eac07340dbe2246c15418e8d6825ce5c2c29e.zip
code cleanup
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 d1962d140..3b1986d40 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt
@@ -6,7 +6,9 @@ import kotlin.math.max
object ColorUtils {
/** transfer string colors from the config to java.awt.Color */
- fun String.toChromaColor() = Color(SpecialColour.specialToChromaRGB(this), true)
+ fun String.toChromaColor() = Color(toChromaColorInt(), true)
+ fun String.toChromaColorInt() = SpecialColour.specialToChromaRGB(this)
+
fun getRed(colour: Int) = colour shr 16 and 0xFF
fun getGreen(colour: Int) = colour shr 8 and 0xFF