aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-01-31 16:22:01 +0100
committerwout <wout@impinc.co.uk>2014-01-31 16:22:01 +0100
commit2b2a4040f69fde2fb6555c663da8ef6235639dd0 (patch)
tree522edabba7b250ff7fa31011213a98e95786e59e /README.md
parentb095d2949b24da056a0d968e0f2ba306d0d1f48d (diff)
downloadsvg.js-2b2a4040f69fde2fb6555c663da8ef6235639dd0.tar.gz
svg.js-2b2a4040f69fde2fb6555c663da8ef6235639dd0.zip
Added morph() and at() methods to SVG.Color
Diffstat (limited to 'README.md')
-rw-r--r--README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
index 138ea7c..b5e280f 100644
--- a/README.md
+++ b/README.md
@@ -1782,6 +1782,22 @@ Get the brightness of a color:
color.brightness() //-> returns 0.344
```
+### morph()
+Make a color morphable:
+
+```javascript
+color.morph('#000')
+```
+
+### at()
+Get morphable color at given position:
+
+```javascript
+var color = new SVG.Color('#ff0066').morph('#000')
+color.at(0.5).toHex() //-> '#7f0033'
+```
+
+
This is the perceived brighness where `0` is black and `1` is white.