# color-from-string

> Convert any string to hex color code with predicable results

Latest version **0.0.2** (published 2022-05-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install color-from-string
pnpm add color-from-string
yarn add color-from-string
bun add color-from-string
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2022-05-21 |
| First published | 2022-05-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 53.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sergey Klinov |
| Maintainers | sergeyklinov |

## Links

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

## Recent versions

- 0.0.2 (latest) — 2022-05-21
- 0.0.1 — 2022-05-21

## README

# color-from-string

Zero-dependency, lightweight package to convert a given string (intended to use with user names) to a HEX color code.
The library uses classic hash algorithm.

https://www.npmjs.com/package/color-from-string

## Installation 
```bash
npm i color-from-string
```

## Usage

```typescript
import colorFromString from 'color-from-string';

const name: string = "Sergey Klinov";

const colorCode: string = colorFromString(name);

console.log(colorCode); // #352475
```

## Tests

```bash
npm run test
```

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