Permalink
Browse files

Merge branch 'master' into gh-pages

  • Loading branch information...
2 parents 225d0a1 + 28a0ef4 commit b0ad2c55cc67212489e1603411702e6081d76fa4 @bgrins committed Jul 23, 2012
Showing with 64 additions and 49 deletions.
  1. +37 −28 README.md
  2. +15 −15 tinycolor-min.js
  3. +12 −6 tinycolor.js
View
@@ -3,36 +3,41 @@
### Features
* Color Types Supported
-** Hex
- tinycolor("#000");
- tinycolor("000");
- tinycolor("#f0f0f6");
- tinycolor("f0f0f6");
-** RGB, RGBA
- tinycolor("rgb (255, 0, 0)");
- tinycolor("rgb 255 0 0");
- tinycolor("rgba (255, 0, 0, .5)");
- tinycolor({ r: 255, g: 0, b: 0 });
-** HSL, HSLA
- tinycolor("hsl(0, 100%, 50%)");
- tinycolor("hsla(0, 100%, 50%, .5)");
- tinycolor("hsl(0, 100%, 50%)");
- tinycolor("hsl 0 1.0 0.5");
- tinycolor({ h: 0, s: 1, l: .5 }");
-** HSV, HSVA
- tinycolor("hsv(0, 100%, 100%)");
- tinycolor("hsva(0, 100%, 100%, .5)");
- tinycolor("hsv (0 100% 100%)");
- tinycolor("hsv 0 1 1");
- tinycolor({ h: 0, s: 100, v: 100 }");
-** Named
- tinycolor("RED");
- tinycolor("blanchedalmond");
- tinycolor("darkblue");
+ * Hex
+ tinycolor("#000");
+ tinycolor("000");
+ tinycolor("#f0f0f6");
+ tinycolor("f0f0f6");
+ * RGB, RGBA
+
+ tinycolor("rgb (255, 0, 0)");
+ tinycolor("rgb 255 0 0");
+ tinycolor("rgba (255, 0, 0, .5)");
+ tinycolor({ r: 255, g: 0, b: 0 });
+ * HSL, HSLA
+
+ tinycolor("hsl(0, 100%, 50%)");
+ tinycolor("hsla(0, 100%, 50%, .5)");
+ tinycolor("hsl(0, 100%, 50%)");
+ tinycolor("hsl 0 1.0 0.5");
+ tinycolor({ h: 0, s: 1, l: .5 }");
+ * HSV, HSVA
+
+ tinycolor("hsv(0, 100%, 100%)");
+ tinycolor("hsva(0, 100%, 100%, .5)");
+ tinycolor("hsv (0 100% 100%)");
+ tinycolor("hsv 0 1 1");
+ tinycolor({ h: 0, s: 100, v: 100 }");
+ * Named
+
+ tinycolor("RED");
+ tinycolor("blanchedalmond");
+ tinycolor("darkblue");
* File Size:
-The minified size is:
-The uncompressed size is:
+
+ The minified size is:
+ The uncompressed size is:
### Usage
var t = tinycolor("red");
@@ -46,6 +51,10 @@ The uncompressed size is:
t.toHsl() // {"h":0,"s":1,"l":0.5}
t.toHslString() // "hsl(0, 100%, 50%)"
t.toName() // "red"
+
+`tinycolor` may also be included as a [node](http://nodejs.org/) module like so:
+
+ var tinycolor = require("./tinycolor");
### Accepted String Input
The string parsing is very permissive. It is meant to make typing a color as input as easy as possible. All commas, percentages, parenthesis are optional, and most input allow either 0-1, 0%-100%, or 0-n (where n is either 100, 255, or 360 depending on the value).
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit b0ad2c5

Please sign in to comment.