Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/unclebill/color-by-chars
- Owner: UncleBill
- Created: 2018-02-07T09:30:26.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-09-26T21:43:37.000Z (about 2 months ago)
- Last Synced: 2024-10-15T09:22:35.777Z (about 1 month ago)
- Topics: color-text, colorful
- Language: CSS
- Homepage: https://unclebill.github.io/color-by-chars
- Size: 10.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
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