# grab-color

> CLI to get dominant colors out of an image

Latest version **1.1.1** (published 2022-05-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install grab-color
pnpm add grab-color
yarn add grab-color
bun add grab-color
```

Provides the command `grab-color`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2022-05-13 |
| First published | 2022-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 5.3 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| Author | Jialiang Li |
| Maintainers | lijialiang93 |
| Keywords | color, grab-color, color-palette, image, color-scheme |

## Links

- npm: https://www.npmjs.com/package/grab-color
- npm.io page: https://npm.io/package/grab-color

## Dependencies (5)

- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [sharp](https://npm.io/package/sharp.md) ^0.30.4
- [canvas](https://npm.io/package/canvas.md) ^2.9.1
- [commander](https://npm.io/package/commander.md) ^9.2.0
- [node-kmeans](https://npm.io/package/node-kmeans.md) ^1.1.9

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 1.1.1 (latest) — 2022-05-13
- 1.0.0 — 2022-05-02

## README

# grab-color

CLI to get dominant colors out of an image

## Installation

```
npm install -g grab-color
```

install dependency on Apple M1
```
arch -arm64 brew install pkg-config cairo pango libpng jpeg giflib librsvg
```

## Usage

```
grab-color -p <path-to-image> -c <number-of-color-to-extract> -o <output-data-image>
```

example

```
grab-color -p ./lena.png -c 5 -o ./output.jpg
```

---
_Source: https://npm.io/package/grab-color · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
