in the (menuname)Screen code document, which you can acces by rightclicking on the gui object in the browser and edit in code, there is an override right at the end which should look like this:
and this number: -15728641 which i highlighted in the code represents the color, now you can make a procedure that returns the number that represents your color and link the procedure in the custom code.
for example: guiGraphics.drawString(this.font, Component.translatable("gui.test.(guiname).label_(TextId)"), 79, 27, ColorProcedure.Color(), false);
maybe ask chatgpt about the code and make the procedure not locked, just make it return a custom code snippet.
i cant code java, i just figured that out by looking at it so you may seek help from chatgpt in general, but you need to tell it that you are on neoforge 1.21.8 (i think you are on there) a lot so it doesnt give you random code for old forge versions or smth
@Override
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
guiGraphics.drawString(this.font, Component.translatable("gui.test.(guiname).label_(TextId)"), 79, 27, -15728641, false);
}
in the (menuname)Screen code document, which you can acces by rightclicking on the gui object in the browser and edit in code, there is an override right at the end which should look like this:
and this number: -15728641 which i highlighted in the code represents the color, now you can make a procedure that returns the number that represents your color and link the procedure in the custom code.
for example:
guiGraphics.drawString(this.font, Component.translatable("gui.test.(guiname).label_(TextId)"), 79, 27, ColorProcedure.Color(), false);
maybe ask chatgpt about the code and make the procedure not locked, just make it return a custom code snippet.
i cant code java, i just figured that out by looking at it so you may seek help from chatgpt in general, but you need to tell it that you are on neoforge 1.21.8 (i think you are on there) a lot so it doesnt give you random code for old forge versions or smth