Skip to content

Commit

Permalink
hashToHex
Browse files Browse the repository at this point in the history
  • Loading branch information
supertick committed Dec 5, 2023
1 parent 0dce02c commit 2f50853
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/org/myrobotlab/codec/CodecUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -1685,4 +1685,10 @@ public static int[] hexToRGB(String hexValue) {
}
return rgb;
}

public static String hashcodeToHex(int hashCode) {
String hexString = Long.toHexString(hashCode).toUpperCase();
return String.format("%6s", hexString).replace(' ', '0').substring(0, 6);
}

}

0 comments on commit 2f50853

Please sign in to comment.