diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt index b878869abc63..ce97764e0489 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ColorUtils.kt @@ -11,9 +11,9 @@ object ColorUtils { fun getAlpha(colour: Int) = colour shr 24 and 0xFF - fun blend(start: Color, end: Color, percent: Double) = Color( - (start.getRed() * (1 - percent) + end.getRed() * percent).toInt(), - (start.getGreen() * (1 - percent) + end.getGreen() * percent).toInt(), - (start.getBlue() * (1 - percent) + end.getBlue() * percent).toInt() + fun blendRGB(start: Color, end: Color, percent: Double) = Color( + (start.red * (1 - percent) + end.red * percent).toInt(), + (start.green * (1 - percent) + end.green * percent).toInt(), + (start.blue * (1 - percent) + end.blue * percent).toInt() ) } diff --git a/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt b/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt index 021572e5b88c..e1e7ca1a89b0 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/renderables/Renderable.kt @@ -314,7 +314,7 @@ interface Renderable { override val verticalAlign = verticalAlign val progress = (1.0 + percent * (width - 2.0)).toInt() - val color = ColorUtils.blend(startColor, endColor, percent) + val color = ColorUtils.blendRGB(startColor, endColor, percent) override fun render(posX: Int, posY: Int) { Gui.drawRect(0, 0, width, height, 0xFF43464B.toInt())