**[node-pixel-async](../README.md)**

> [Globals](../globals.md) / "utils"

# Module: "utils"

## Index

### Type aliases

* [rgbInputArray](_utils_.md#rgbinputarray)

### Functions

* [buildGammaTable](_utils_.md#buildgammatable)
* [colorValue](_utils_.md#colorvalue)
* [normalizeColor](_utils_.md#normalizecolor)
* [normalizeColorWithBrightness](_utils_.md#normalizecolorwithbrightness)
* [rgbToHex](_utils_.md#rgbtohex)

## Type aliases

### rgbInputArray

Ƭ  **rgbInputArray**: [number, number, number, undefined \| number]

*Defined in [lib/utils.ts:3](https://github.com/hweeks/node-pixel-async/blob/c53dd89/lib/utils.ts#L3)*

## Functions

### buildGammaTable

▸ **buildGammaTable**(`steps`: number, `gamma`: number): number[]

*Defined in [lib/utils.ts:8](https://github.com/hweeks/node-pixel-async/blob/c53dd89/lib/utils.ts#L8)*

#### Parameters:

Name | Type |
------ | ------ |
`steps` | number |
`gamma` | number |

**Returns:** number[]

___

### colorValue

▸ **colorValue**(`colors`: [rgbInputArray](_utils_.md#rgbinputarray), `g_table`: number[]): number

*Defined in [lib/utils.ts:13](https://github.com/hweeks/node-pixel-async/blob/c53dd89/lib/utils.ts#L13)*

#### Parameters:

Name | Type |
------ | ------ |
`colors` | [rgbInputArray](_utils_.md#rgbinputarray) |
`g_table` | number[] |

**Returns:** number

___

### normalizeColor

▸ **normalizeColor**(`colors`: [rgbInputArray](_utils_.md#rgbinputarray), `whiteCap`: [ChannelTransformArray](_types_.md#channeltransformarray)): number

*Defined in [lib/utils.ts:17](https://github.com/hweeks/node-pixel-async/blob/c53dd89/lib/utils.ts#L17)*

#### Parameters:

Name | Type |
------ | ------ |
`colors` | [rgbInputArray](_utils_.md#rgbinputarray) |
`whiteCap` | [ChannelTransformArray](_types_.md#channeltransformarray) |

**Returns:** number

___

### normalizeColorWithBrightness

▸ **normalizeColorWithBrightness**(`colors`: [rgbInputArray](_utils_.md#rgbinputarray), `brightness`: number, `whiteCap`: [ChannelTransformArray](_types_.md#channeltransformarray)): number

*Defined in [lib/utils.ts:26](https://github.com/hweeks/node-pixel-async/blob/c53dd89/lib/utils.ts#L26)*

#### Parameters:

Name | Type |
------ | ------ |
`colors` | [rgbInputArray](_utils_.md#rgbinputarray) |
`brightness` | number |
`whiteCap` | [ChannelTransformArray](_types_.md#channeltransformarray) |

**Returns:** number

___

### rgbToHex

▸ `Const`**rgbToHex**(`colorArray`: [rgbInputArray](_utils_.md#rgbinputarray)): number

*Defined in [lib/utils.ts:5](https://github.com/hweeks/node-pixel-async/blob/c53dd89/lib/utils.ts#L5)*

#### Parameters:

Name | Type |
------ | ------ |
`colorArray` | [rgbInputArray](_utils_.md#rgbinputarray) |

**Returns:** number
