Hex

From Sega Retro

This template displays a hexadecimal value with the appropriate formatting.

Example

{{hex|0123}} returns 123.

{{hex|$78000}} returns 00078000.

{{hex|0x1800}} returns 1800.

{{hex|abcde}} returns 000ABCDE.

{{hex|$00}} returns 0.