# color-generator

> Generates colors based on the golden ratio

Latest version **0.1.0** (published 2014-05-14) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-05-14 |
| First published | 2014-05-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Devon Govett |
| Maintainers | devongovett |
| Keywords | color, generate, random |

## Links

- npm: https://www.npmjs.com/package/color-generator
- Repository: https://github.com/devongovett/color-generator
- Issues: https://github.com/devongovett/color-generator/issues
- npm.io page: https://npm.io/package/color-generator

## Dependencies (1)

- [color](https://npm.io/package/color.md) ^0.6.0

## 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

- 0.1.0 (latest) — 2014-05-14

## README

# color-generator

Generates colors based on the golden ratio, inspired by Martin Ankerl's 
[blog post](http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/).
The generated colors are more visually pleasing together than a simple random color generator because
they are computed by moving around the color wheel in increments of the golden ratio. 
By default, the generated colors can used as a background for legible black text, 
but the color generator can be customized for other uses.

Returns [color](https://github.com/harthur/color) objects so you can convert the colors to any colorspace
or CSS string representation easily.

## Example

```javascript
var gen = require('color-generator');

// see https://github.com/harthur/color for docs on conversions
gen().hexString() // '#BF79F2'
gen().rgbString() // 'rgb(242, 226, 121)'

// provide custom saturation and brightness
gen(0.8, 0.25).hexString() // '#0D1C40'
```

## License

MIT

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