Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import net.minecraft.item.ItemStack
import net.minecraft.item.Items
import net.minecraft.item.tooltip.TooltipData
import net.minecraft.screen.slot.Slot
import net.minecraft.util.Colors
import net.minecraft.util.DyeColor
import net.minecraft.util.Identifier

Expand Down Expand Up @@ -98,7 +99,7 @@ object ContainerPreview : Module(
val g = ((tintColor shr 8) and 0xFF) / 255f
val b = (tintColor and 0xFF) / 255f
val luminance = 0.299f * r + 0.587f * g + 0.114f * b
return if (luminance > 0.5f) 0x404040 else 0xFFFFFF
return if (luminance > 0.7f) Colors.DARK_GRAY else Colors.WHITE
}

@JvmStatic
Expand Down