UUID color calculation
How Minecraft Locator Bar Colors Are Calculated
This page is the calculation reference. It shows how a Minecraft Java UUID is turned into the default Locator Bar HEX and RGB color. Use the homepage checker when you want a lookup tool; stay here for the math, the bit operations, and verified examples.

The formula at a glance
Java stores a UUID as two 64-bit halves. XOR those halves, XOR the upper and lower 32-bit words, then keep the lowest 24 bits as red, green, and blue.
hilo = mostSignificantBits XOR leastSignificantBits
hash = upper32(hilo) XOR lower32(hilo)
rgb = hash AND 0x00FFFFFF
hex = padToSixHexDigits(rgb)The public Java API documents the most-significant and least-significant bit accessors and the class's hashCode() method. The checker mirrors those fixed-width operations with JavaScript BigInt so ordinary floating-point numbers never round the UUID.
Step-by-step calculation for Notch
| Stage | Value | What happens |
|---|---|---|
| UUID | 069a79f4-44e9-4726-a5be-fca90e38aaf5 | Remove dashes, preserving every hexadecimal digit. |
| MSB | 069A79F444E94726 | First 16 hexadecimal digits, or 64 bits. |
| LSB | A5BEFCA90E38AAF5 | Last 16 hexadecimal digits, or 64 bits. |
| MSB XOR LSB | A324855D4AD1EDD3 | Combines both UUID halves without losing bits. |
| 32-bit hash | E9F5688E | XOR the upper and lower 32-bit words. |
| Low 24 bits | F5688E | Drop the highest hash byte. |
| Result | #F5688E | RGB 245, 104, 142. |
JavaScript implementation
function uuidToColor(uuid) {
const hex = uuid.replaceAll("-", "");
const msb = BigInt("0x" + hex.slice(0, 16));
const lsb = BigInt("0x" + hex.slice(16));
const hilo = msb ^ lsb;
const hash = ((hilo >> 32n) ^ hilo) & 0xffffffffn;
const rgb = Number(hash & 0xffffffn);
return "#" + rgb.toString(16).padStart(6, "0");
}BigInt is essential here. JavaScript's regular number type cannot exactly represent every 64-bit integer. Converting the full UUID to a number first can silently change bits and therefore return the wrong color.
Java implementation
UUID uuid = UUID.fromString(input);
int hash = uuid.hashCode();
int rgb = hash & 0x00FFFFFF;
String hex = String.format("#%06X", rgb);
int red = (rgb >>> 16) & 0xFF;
int green = (rgb >>> 8) & 0xFF;
int blue = rgb & 0xFF;Java's signed int may display the hash as a negative decimal number, but its 32-bit pattern is unchanged. Masking with 0x00FFFFFF deliberately discards the top byte. Unsigned right shift is useful when reading channels, although each channel is masked to eight bits afterward.
Three UUID verification examples
| Player | Java UUID | Hash | HEX | RGB |
|---|---|---|---|---|
| Notch | 069a79f4-44e9-4726-a5be-fca90e38aaf5 | E9F5688E | #F5688E | 245, 104, 142 |
| jeb_ | 853c80ef-3c37-49fd-aa49-938b674adae6 | 7408807F | #08807F | 8, 128, 127 |
| Dinnerbone | 61699b2e-d327-4a01-9f1e-0ea8c3f06bc6 | EEA0B441 | #A0B441 | 160, 180, 65 |
These names are examples, not identity guarantees. A username lookup resolves a current Java UUID first; the color calculation itself uses only the UUID.
Common implementation mistakes
- Using
parseInton all 128 bits: precision is lost before bitwise work begins. - Dropping leading zeroes:
#08807Fmust remain six hexadecimal digits. - Confusing signed and unsigned output: decimal signs do not change the underlying 32-bit pattern.
- Hashing the username: usernames can change; the Java UUID is the stable input.
- Assuming uniqueness: 128 bits collapse to 24 color bits, so collisions are unavoidable.
- Ignoring server overrides: teams and waypoint commands may replace the calculated default.
Frequently asked questions
Why does changing a Minecraft username not change the color?
The calculation uses the account UUID, not the visible username. A Java account keeps its UUID through username changes, so the calculated default color stays the same.
Can two UUIDs produce the same Locator Bar color?
Yes. The final color has 24 bits, while a UUID has 128 bits. Many UUIDs must therefore map to the same color, and even different colors may look similar on a small HUD marker.
Why does my in-game marker differ from the calculated default?
Teams and operator commands can override the default indicator color. This page calculates the UUID-derived default, not a server-side override.
Does this calculation work for Bedrock Edition?
No. This implementation uses Java Edition UUIDs and Java UUID.hashCode() behavior. Bedrock accounts use a different identity system.
Look up a color or troubleshoot the HUD
To resolve a Java username or paste a UUID, use the Minecraft Locator Bar Color Checker. For missing markers, the locator_bar game rule, servers, and sneak or invisibility behavior, continue to the Minecraft Locator Bar guide.