From 797de00fe95bf899101b2ac31384559b9da00518 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Tue, 6 Aug 2024 23:59:54 +0300 Subject: [PATCH] ColorManager: Fix encoder for colors It's not used, but it's good to have a proper one in any case. --- .../main/java/juuxel/adorn/client/resources/ColorManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/juuxel/adorn/client/resources/ColorManager.java b/common/src/main/java/juuxel/adorn/client/resources/ColorManager.java index a9e353e4d..676ce199c 100644 --- a/common/src/main/java/juuxel/adorn/client/resources/ColorManager.java +++ b/common/src/main/java/juuxel/adorn/client/resources/ColorManager.java @@ -107,7 +107,7 @@ public record ColorPair(int bg, int fg) { private static final int DEFAULT_FG = Colors.SCREEN_TEXT; private static final Codec COLOR_CODEC = - Codec.STRING.comapFlatMap(ColorManager::parseHexColor, color -> HexFormat.of().withUpperCase().toHexDigits(color)); + Codec.STRING.comapFlatMap(ColorManager::parseHexColor, color -> '#' + HexFormat.of().withUpperCase().toHexDigits(color)); public static final Codec CODEC = Codecs.alternatively( RecordCodecBuilder.create(instance -> instance.group( COLOR_CODEC.fieldOf("bg").forGetter(ColorPair::bg),