Skip to content

Commit

Permalink
i am an idiot
Browse files Browse the repository at this point in the history
  • Loading branch information
uku3lig committed Feb 6, 2024
1 parent 9ab2c97 commit 2c96127
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private static Optional<Integer> convert(String value, boolean allowAlpha) {
value = value.replace("#", "");
if (value.length() == 6 || (allowAlpha && value.length() == 8)) {
int color = Integer.parseUnsignedInt(value, 16);
if (color <= 0xFFFFFF && allowAlpha) color |= (0xFF << 24);
if (color <= 0xFFFFFF && !allowAlpha) color |= (0xFF << 24);

return Optional.of(color);
}
Expand Down

0 comments on commit 2c96127

Please sign in to comment.