bit. tohex Synchronous
Represent a 32-bit value as lowercase hexadecimal text. Use it to inspect masks, colors, or packed fields; the output has no 0x prefix or leading padding.
Luau
bit.tohex(value: number, ...ignored: any) -> stringParameters
| Parameter | Type | Description |
|---|---|---|
value | number | Numeric value to convert. |
...ignored | any | Additional arguments are ignored. A width or padding argument is not implemented. |
Returns
stringUnpadded lowercase hexadecimal text.
Differences from Volt
Volt documents its Bit Library setting as disabled by default. Kawaii enables bit by default. Disabling the setting removes the bit global and makes retained function references reject calls.
Availability
Bit is enabled by default. The bit global is removed when disabled, and its operations check the setting.
Example
Luau
print(bit.tohex(0x0000000f)) -- f
print(bit.tohex(255)) -- ff