# colorspace

> Generate HEX colors for a given namespace.

Latest version **1.1.4** (published 2021-10-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install colorspace
pnpm add colorspace
yarn add colorspace
bun add colorspace
```

## 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.4 |
| Published | 2021-10-20 |
| First published | 2015-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Arnout Kazemier |
| Maintainers | 3rdeden |
| Keywords | namespace, color, hex, colorize, name, space, colorspace |

## Links

- npm: https://www.npmjs.com/package/colorspace
- Repository: https://github.com/3rd-Eden/colorspace
- Issues: https://github.com/3rd-Eden/colorspace/issues
- npm.io page: https://npm.io/package/colorspace

## Dependencies (2)

- [color](https://npm.io/package/color.md) ^3.1.3
- [text-hex](https://npm.io/package/text-hex.md) 1.0.x

## 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.4 (latest) — 2021-10-20
- 1.1.3 — 2021-10-20
- 1.1.2 — 2019-04-26
- 1.1.1 — 2018-07-17
- 1.1.0 — 2018-07-17
- 1.0.1 — 2015-05-29
- 1.0.0 — 2015-05-28

## README

# colorspace

Colorspace is a simple module which generates HEX color codes for namespaces.
The base color is decided by the first part of the namespace. All other parts of
the namespace alters the color tone. This way you can visually see which
namespaces belong together and which does not.

## Installation

The module is released in the public npm registry and can be installed by
running:

```
npm install --save colorspace
```

## Usage

We assume that you've already required the module using the following code:

```js
'use strict';

var colorspace = require('colorspace');
```

The returned function accepts 2 arguments:

1. `namespace` **string**, The namespace that needs to have a HEX color
   generated.
2. `delimiter`, **string**, **optional**, Delimiter to find the different
   sections of the namespace. Defaults to `:`

#### Example

```js
console.log(colorspace('color')) // #6b4b3a
console.log(colorspace('color:space')) // #796B67
```

## License

MIT

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