# Color.getHexStr

Get the hex representation of the color.

**Kind:** Function

**Environments:** Game, Terrain

## Game

``` { .lua .api-signature }
color:getHexStr(  )
```

[Open the full Game reference](../Game-Script-Environment/Userdata/Color.md#gethexstr)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `color` | [Color](../Game-Script-Environment/Userdata/Color.md) | The color object. |

**Returns:**

| Type | Description |
| --- | --- |
| string | Hex string. |

## Terrain

``` { .lua .api-signature }
color:getHexStr(  )
```

[Open the full Terrain reference](../Terrain-Script-Environment/Userdata/Color.md#gethexstr)

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `color` | [Color](../Terrain-Script-Environment/Userdata/Color.md) | The color object. |

**Returns:**

| Type | Description |
| --- | --- |
| string | Hex string. |
