diff options
author | wout <wout@impinc.co.uk> | 2014-01-31 16:22:01 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-01-31 16:22:01 +0100 |
commit | 2b2a4040f69fde2fb6555c663da8ef6235639dd0 (patch) | |
tree | 522edabba7b250ff7fa31011213a98e95786e59e /README.md | |
parent | b095d2949b24da056a0d968e0f2ba306d0d1f48d (diff) | |
download | svg.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.md | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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. |