--- title: "fromHex" description: "Returns an integer value of the hex formatted string argument." --- # fromHex > Returns an integer value of the hex formatted string argument. **This function is used by Ignition's Expression language.** ## Description Returns an integer value of the hex formatted string argument. Numbers outside of the range (-231) - (231-1), and strings that are not hex numbers, return null. ## Syntax `fromHex(string)` ### Parameters | Type | Parameter | Description | |---|---|---| | String | `string` | A string representation of a hex value. | ### Results **Integer** - The integer of the hex value. ## Examples ```python title="Code Snippet" fromHex("ff") //returns 255 ``` ```python title="Code Snippet" fromHex("0xff") //returns 255 ``` ```python title="Code Snippet" fromHex("-ff") //returns -255 ```