Skip to content

Commit

Permalink
Add color swatches to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
supercrabtree committed Apr 27, 2016
1 parent 0f64735 commit 7e12431
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 5 deletions.
3 changes: 3 additions & 0 deletions media/calm-seafoam-green.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions media/dijon-mustard-yellow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions media/grey-willis.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions media/mid-turquiose-blue.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 17 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ Hashbow creates hexadecimal colors of everything. You can think of it like a cry

outputs `#40BFA8`, a lovely mid turquiose blue.

![](https://raw.githubusercontent.com/supercrabtree/hashbow/master/media/mid-turquiose-blue.svg)

whereas

`hashbow('Nicolas Cage')`

outputs a `#BFA840`, a Dijon Mustard kind of color.

![](https://raw.githubusercontent.com/supercrabtree/hashbow/master/media/dijon-mustard-yellow.svg)

##### But whats the point?

Hashbow's color conversion is consistent, so every time you call `hashbow('Bruce Willis')` you will get the same lovely mid turquoise blue. This is very useful for assigning your users a color, brightening up a comment area, etc.
Expand All @@ -22,20 +26,24 @@ Hashbow uses the HSL colorspace to make it easy to get colors that work well tog

Outputs `#669990`, a calmer seafoam green.

You could use this to make all results greyscale.
![](https://raw.githubusercontent.com/supercrabtree/hashbow/master/media/calm-seafoam-green.svg)

Setting the saturation to 0 will make everything greyscale.

`hashbow('Bruce Willis', 0);`

Outputs `#7E8180`

Hashbow will create color hashes of anything and everything, Strings, Objects, Functions, Numbers, null, undefined, Booleans, RegExps and Arrays.
![](https://raw.githubusercontent.com/supercrabtree/hashbow/master/media/grey-willis.svg)

Hashbow will create color hashes of anything and everything, Strings, Objects, Functions, Numbers, whatever, etc.


### Installation
`npm install hashbow`

### Usage
`hashbow(object, saturation, lightness)`
`hashbow(thingyToHash, saturation, lightness)`

### Example
```
Expand All @@ -48,17 +56,21 @@ actors.forEach(actor => {
el.innerHTML = actor;
el.style.color = hashbow(actor);
document.body.appendChild(el);
});
```

### CLI
There is a CLI just install globally
There is a CLI, just install globally

`npm install hashbow --global`

and then

`hashbow 'Bruce Willis'`

then color up your git logs, or like, something else that's cool

🙂️

0 comments on commit 7e12431

Please sign in to comment.