Skip to content

Commit

Permalink
Ready for takeoff
Browse files Browse the repository at this point in the history
  • Loading branch information
kaanon committed Jan 5, 2016
1 parent d5106e4 commit 079cc9e
Show file tree
Hide file tree
Showing 6 changed files with 681 additions and 25 deletions.
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,37 @@ Color utility. Provides functionality to determine the name of a color.
Also provides hue, saturation, value, lightness (or brightness) and can be exported as a css declaration.

## Installation
`bower install colorficial`

TBD
`npm install --save colorficial`

## Usage

### Instantiation

```javascript
var c = new Color(255,100,100);
var c = new Color([255,100,100]);

// Client Side with Bower
var Color = require('../../bower_components/colorficial/dist/color');
// Server Side with node.js
var Color = require('colorficial');

var c = new Color(255,100,100); //red, green, blue
var c = new Color([255,100,100]); // [red, green, blue]
var c = new Color('#FF9922');
var c = new Color({r: 255, g: 100, b: 100});
var c = new Color({red: 255, green: 100, blue: 100});
```
### "is" Methods


### Name Methods
```javascript
var c = new Color([11, 170, 181]);

c.name();
// blue
c.names();
// ["blue","green"]

c.is('red');
// false
Expand Down Expand Up @@ -98,11 +110,13 @@ c.toString()
- black
- white

## Gotchas
Teal (blue/green) and dark pink are pretty 💩. Still working on that.

## TODO
- bower support
- npm support
- more color names
- more color names (extendable?)

## License

[MIT](http://opensource.org/licenses/MIT) © [Kaanon MacFarlane](http://kaanon.com)
Loading

0 comments on commit 079cc9e

Please sign in to comment.