We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8431bc commit 6f0375fCopy full SHA for 6f0375f
1 file changed
src/main/kotlin/com/lambda/module/modules/render/ContainerPreview.kt
@@ -38,6 +38,7 @@ import net.minecraft.item.ItemStack
38
import net.minecraft.item.Items
39
import net.minecraft.item.tooltip.TooltipData
40
import net.minecraft.screen.slot.Slot
41
+import net.minecraft.util.Colors
42
import net.minecraft.util.DyeColor
43
import net.minecraft.util.Identifier
44
@@ -98,7 +99,7 @@ object ContainerPreview : Module(
98
99
val g = ((tintColor shr 8) and 0xFF) / 255f
100
val b = (tintColor and 0xFF) / 255f
101
val luminance = 0.299f * r + 0.587f * g + 0.114f * b
- return if (luminance > 0.5f) 0x404040 else 0xFFFFFF
102
+ return if (luminance > 0.7f) Colors.DARK_GRAY else Colors.WHITE
103
}
104
105
@JvmStatic
0 commit comments