PT-BR EN ES
Channel Icon

Crazy Ozz

Official Channel Website

Command Block

HEX/RGB Color to Decimal NBT Converter

Convert colors from HEX, RGB, or the visual picker to the decimal value used in NBT components of Minecraft Java Edition, such as text_display, armor stand, maps, fireworks, and beacons.

Selected Color
#FF0000 · 16,711,680

Without the #. E.g., FF0000 for red, 55FFFF for cyan.

Each value ranges from 0 to 255.

#FF0000

Accepts Decimal RGB (0 to 16,777,215) or ARGB, positive or negative (e.g., -65536).

Results — Click to Copy
Decimal RGB
16711680
Used in CustomColor, color (armor stand, text)
Decimal ARGB
-65536
text_display background (includes alpha)
Hex
#FF0000
Standard visual format
RGB
255, 0, 0
Values separated R G B
Hex (0x)
0xFF0000
Programming format
Binary R
11111111
R=255 in binary
Ready-to-use NBT Snippets
text_display — color
/summon text_display ~ ~ ~ {text:'{"text":"Hello"}',billboard:"center",text_color:16711680}
text_display — background (ARGB)
/data merge entity @e[type=text_display,c=1] {background:-65536}
armor stand — CustomColor (leather)
/give @s leather_chestplate[minecraft:dyed_color=16711680]
filled_map — custom_color
/give @s filled_map[minecraft:map_color=16711680]
firework — color
/give @s firework_rocket[minecraft:fireworks={explosions:[{colors:[16711680]}]}]
beacon — beam color (via /data)
/data merge block ~ ~ ~ {PrimaryColor:16711680}
Minecraft Colors — § Codes
How It Works
RGB → Decimal Formula:
decimal = R × 65536 + G × 256 + B
e.g.: (255, 0, 0) = 255×65536 = 16,711,680
With Alpha (ARGB):
decimal = A × 16777216 + R × 65536 + G × 256 + B
e.g.: text_display background uses ARGB
Negative Value (signed):
If decimal > 2147483647 → value = decimal − 4294967296
e.g.: #FF000000 (opaque black) = -16777216

Want to create a cheap Minecraft server with no lag?

I recommend Sparked Host: affordable plans, great performance, easy panel, and fast support.

🚀 Create a server on Sparked Host

How to Use the Color Converter

Choose the input mode in HEX, RGB, visual Picker, or Decimal → Color (for the reverse path, when you already have a decimal number from an NBT and want to find the color). The "Results" panel shows all representations of the color — click on any card to copy the value.

The "Ready-to-use NBT Snippets" automatically update the decimal value as you change the color, ready to paste into game chat in commands like /summon, /give, and /data merge.

RGB, ARGB, and Negative Values

Most NBT fields (such as color on armor stands and text_color on text_display) use only RGB, which is always a positive number between 0 and 16,777,215. On the other hand, the background field of text_display uses ARGB (with an alpha channel) in a signed 32-bit integer — which is why values with high transparency or total opacity appear as negative numbers.

Frequently Asked Questions

How do you convert a HEX color to decimal in Minecraft?

Convert the HEX to R, G, and B values (0-255) and apply the formula decimal = R × 65536 + G × 256 + B.

Why is the text_display background negative?

Because that field uses signed 32-bit ARGB. When the value exceeds 2,147,483,647, it is represented as a negative number.

What is the difference between Decimal RGB and Decimal ARGB?

Decimal RGB has no alpha channel and ranges from 0 to 16,777,215. Decimal ARGB includes transparency and can appear as a negative number in signed fields.

Related Tools