p0t4t0sandwich / TaterLib

A cross API code library that allows developers to write code that works across multiple modding platforms, and across a wide range of Minecraft versions, all with one JAR file. If TaterLib runs on it, so can your plugin/mod.
GNU General Public License v3.0
8 stars 2 forks source link

Colour text component and RGB support #49

Open p0t4t0sandwich opened 7 months ago

p0t4t0sandwich commented 7 months ago

Basic: Formatting.AQUA RGB:

int rgb = Integer.parseInt("ABCABC", 16); // Also: int rgb = 0xABCABC
Style style = Style.EMPTY.withColor(TextColor.fromRgb(rgb));
Text text = Text.literal("theText").setStyle(style);