Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/unclebill/color-by-chars

Generate color by characters.
https://github.com/unclebill/color-by-chars

color-text colorful

Last synced: 29 days ago
JSON representation

Generate color by characters.

Awesome Lists containing this project

README

        

# color-by-chars

Generate color by characters. Mostly different characters, different colors. [examples](https://unclebill.github.io/color-by-chars)

## Usage

### npm
```sh
npm install color-by-chars
```

```javascript
import colorByChars from 'color-by-chars'
// or const colorByChars = require('color-by-chars')

let [red, green, blue] = colorByChars('Hello World!')

// offset 100, make it different again.
let [red, green, blue] = colorByChars('Hello World!', 100)
```

### browser

```html

console.log(colorByChars('Hello World!'))
// => [34, 0, 0]
// [RED, GREEN, BLUE]

```

## How
Calculate the product by all charCode's of every character, then map it to color space.

## License

MIT