# @types/get-image-colors

> TypeScript definitions for get-image-colors

Latest version **4.0.5** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/get-image-colors
pnpm add @types/get-image-colors
yarn add @types/get-image-colors
bun add @types/get-image-colors
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.0.5 |
| Published | 2023-11-07 |
| First published | 2020-09-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51438 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/get-image-colors
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/get-image-colors
- npm.io page: https://npm.io/package/@types/get-image-colors

## Dependencies (2)

- [@types/node](https://npm.io/package/@types/node.md) *
- [@types/chroma-js](https://npm.io/package/@types/chroma-js.md) *

## Recent versions

- 4.0.5 (latest) — 2023-11-07
- 4.0.2 (ts4.2) — 2022-12-13
- 4.0.1 (ts3.6) — 2021-07-08
- 2.0.0 (ts3.2) — 2020-09-22
- 4.0.4 — 2023-10-18
- 4.0.3 — 2023-09-20
- 4.0.0 — 2021-06-09

## README

# Installation
> `npm install --save @types/get-image-colors`

# Summary
This package contains type definitions for get-image-colors (https://github.com/colorjs/get-image-colors#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/get-image-colors.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/get-image-colors/index.d.ts)
````ts
/// <reference types="node" />

import { Color } from "chroma-js";

/**
 * Extract colors from images. Supports GIF, JPG, PNG, and even SVG!
 */
declare function colorPalette(
    input: Buffer | string,
    typeOrOptions: string | colorPalette.Options,
    callback: colorPalette.Callback,
): void;
declare function colorPalette(input: Buffer | string, typeOrOptions?: string | colorPalette.Options): Promise<Color[]>;
declare function colorPalette(input: Buffer | string, callback: colorPalette.Callback): void;

declare namespace colorPalette {
    interface Options {
        /**
         * @default undefined
         */
        type?: string | undefined;
        /**
         * @default 5
         */
        count?: number | undefined;
    }

    /**
     * If you don't like promises, you can use node-style callbacks too
     */
    type Callback = (error: Error | null, colors: Color[]) => void;
}

export = colorPalette;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: [@types/chroma-js](https://npmjs.com/package/@types/chroma-js), [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [Piotr Błażejewicz](https://github.com/peterblazejewicz).

---
_Source: https://npm.io/package/@types/get-image-colors · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
