From c742b765324ff80ae2b2e7e9cc0213a2eda59385 Mon Sep 17 00:00:00 2001 From: Martin <42899207+MartinRedheLind@users.noreply.github.com> Date: Thu, 12 Feb 2026 00:05:37 +0100 Subject: [PATCH] Fix TextColor not treating hue 1.0 the same as 0.0 --- .../java/net/kyori/adventure/text/format/TextColor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/net/kyori/adventure/text/format/TextColor.java b/api/src/main/java/net/kyori/adventure/text/format/TextColor.java index 30c1886e53..ba72d2ae4c 100644 --- a/api/src/main/java/net/kyori/adventure/text/format/TextColor.java +++ b/api/src/main/java/net/kyori/adventure/text/format/TextColor.java @@ -105,9 +105,7 @@ static TextColor color(final HSVLike hsv) { final float q = v * (1 - s * f); final float t = v * (1 - s * (1 - f)); - if (i == 0) { - return color(v, t, p); - } else if (i == 1) { + if (i == 1) { return color(q, v, p); } else if (i == 2) { return color(p, v, t); @@ -115,8 +113,10 @@ static TextColor color(final HSVLike hsv) { return color(p, q, v); } else if (i == 4) { return color(t, p, v); - } else { + } else if (i == 5) { return color(v, p, q); + } else { + return color(v, t, p); } }