# closest-color-keyword

> Get the closest CSS color keyword for a given value

Latest version **1.1.0** (published 2015-03-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install closest-color-keyword
pnpm add closest-color-keyword
yarn add closest-color-keyword
bun add closest-color-keyword
```

## 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.0 |
| Published | 2015-03-26 |
| First published | 2015-03-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| Author | Brent Jackson |
| Maintainers | jxnblk |
| Keywords | color, keyword, css |

## Links

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

## Dependencies (4)

- [color](https://npm.io/package/color.md) ^0.8.0
- [lodash](https://npm.io/package/lodash.md) ^3.6.0
- [color-diff](https://npm.io/package/color-diff.md) ^0.1.7
- [css-color-list](https://npm.io/package/css-color-list.md) 0.0.1

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2015-03-26
- 1.0.0 — 2015-03-25

## README

# closest-color-keyword

Returns the closest CSS color keyword based on a color value

```bash
npm install closest-color-keyword
```

```js
var keyword = require('closest-color-keyword');

var name = keyword('#f00'); // 'red'
```

## Options

### `basic`
Default false

Returns a keyword from the [CSS1 values](http://www.w3.org/TR/CSS1/#color-units)
for simpler names.

```js
var name = keyword('#228b22', { basic: true });
```

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