Palette | Image Quantization Library (image-q)

### Hierarchy

- Palette

## Index

### Constructors

- constructor

### Properties

- _i32idx
- _pointArray
- _pointContainer

### Methods

- _nearestPointFromCache
- add
- getNearestColor
- getNearestIndex
- getPointContainer
- has
- sort

## Constructors

### constructor

- new Palette(): Palette

- - Defined in utils/palette.ts:19

  #### Returns Palette

## Properties

### Private _i32idx

_i32idx: object

- Defined in utils/palette.ts:19

#### Type declaration

- ##### [key: string]: number

### Private _pointArray

_pointArray: Point[]

- Defined in utils/palette.ts:18

### Private _pointContainer

_pointContainer: PointContainer

- Defined in utils/palette.ts:17

## Methods

### Private _nearestPointFromCache

- _nearestPointFromCache(key: any): number

- - Defined in utils/palette.ts:79

  #### Parameters

  - ##### key: any

  #### Returns number

### add

- add(color: Point): void

- - Defined in utils/palette.ts:27

  #### Parameters

  - ##### color: Point

  #### Returns void

### getNearestColor

- getNearestColor(colorDistanceCalculator: IDistanceCalculator, color: Point): Point

- - Defined in utils/palette.ts:41

  #### Parameters

  - ##### colorDistanceCalculator: IDistanceCalculator

  - ##### color: Point

  #### Returns Point

### Private getNearestIndex

- getNearestIndex(colorDistanceCalculator: IDistanceCalculator, point: Point): number

- - Defined in utils/palette.ts:83

  #### Parameters

  - ##### colorDistanceCalculator: IDistanceCalculator

  - ##### point: Point

  #### Returns number

### getPointContainer

- getPointContainer(): PointContainer

- - Defined in utils/palette.ts:45

  #### Returns PointContainer

### has

- has(color: Point): boolean

- - Defined in utils/palette.ts:32

  #### Parameters

  - ##### color: Point

  #### Returns boolean

### sort

- sort(): void

- - Defined in utils/palette.ts:154

  #### Returns void

Generated using TypeDoc