To-hex - Function SummarySummary:Converts an integer to a hex issue!. Usage:to-hex value Arguments:value - Value to be converted (must be: integer) Description:The TO-HEX function provides an easy way to convert an integer to a hexidecimal value.
The value returned is a string of the ISSUE datatype (not the BINARY datatype). This allows you to convert hex values back to integers:
Note: To convert HTML hex color values (like #80FF80) to REBOL color values, it is easier to do the conversion to binary and then use a base 16 encoding:
The TO-ISSUE function is just used to add the # to it. To convert from an HTML color back to a REBOL color tuple, you can use this:
If the HTML color value is a string, convert it to an issue first. The function below will work for strings and issues:
Related:
| |||||
|