Skip to content

Commit f5dda94

Browse files
Fix TextColor not treating hue 1.0 the same as 0.0
1 parent e2f7a35 commit f5dda94

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

api/src/main/java/net/kyori/adventure/text/format/TextColor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,18 +105,18 @@ static TextColor color(final HSVLike hsv) {
105105
final float q = v * (1 - s * f);
106106
final float t = v * (1 - s * (1 - f));
107107

108-
if (i == 0) {
109-
return color(v, t, p);
110-
} else if (i == 1) {
108+
if (i == 1) {
111109
return color(q, v, p);
112110
} else if (i == 2) {
113111
return color(p, v, t);
114112
} else if (i == 3) {
115113
return color(p, q, v);
116114
} else if (i == 4) {
117115
return color(t, p, v);
118-
} else {
116+
} else if (i == 5) {
119117
return color(v, p, q);
118+
} else {
119+
return color(v, t, p);
120120
}
121121
}
122122

0 commit comments

Comments
 (0)