---
id: fast-colors.gethexstringforbyte
title: getHexStringForByte() function
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-colors](./fast-colors.md) &gt; [getHexStringForByte](./fast-colors.gethexstringforbyte.md)

## getHexStringForByte() function

Converts a number between 0 and 255 to a hex string.

<b>Signature:</b>

```typescript
export declare function getHexStringForByte(i: number): string;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  i | number | the number to convert to a hex string |

<b>Returns:</b>

string
