convert to hex
This block is part of the number group and was last modified in core v10.4.28.
convert to hex v10.4.28 Returns a hexadecimal based of the given number.
In pins 1
- number required
number
Out pins 1
- hex
value
Outputs the number pin as a hexadecimal string using JS Number coercion: numeric strings parse (including 0x/0o/0b prefixes), booleans count as 1/0, nil and empty strings count as 0, and non-numeric values yield the string "NaN". Non-integer values get a hex fractional part. Writes nothing when the number pin is unwired. Example: number=255 -> "ff"; number="0x10" -> "10".
A typical wiring for convert to hex: the hex out pin feeds convert to uppercase.

Version history
Introduced in v10.4.28.
Back to
number Return to the main group to view all sub-groups Back to hexadecimals Return to the group to view all blocks within this group
