diff options
author | wout <wout@impinc.co.uk> | 2013-03-06 19:43:17 +0000 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-03-06 19:43:17 +0000 |
commit | 5e3ff072994d3d9b224c62d71ca1331951249bac (patch) | |
tree | 9bb8b5af1ca4372fcf0c03b0444530fefee20735 /README.md | |
parent | 6a8a3fee7dbfc9a9f4a36dc5877f955f5743a4ac (diff) | |
download | svg.js-5e3ff072994d3d9b224c62d71ca1331951249bac.tar.gz svg.js-5e3ff072994d3d9b224c62d71ca1331951249bac.zip |
Reworked color management
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -329,6 +329,18 @@ draw.each(function(i, children) { }) ``` +## Colors + +Svg.js has a dedicated color module handling different types of colors. Accepted values are: + +- hex string; three based (e.g. #f06) or six based (e.g. #ff0066) +- rgb string; e.g. rgb(255, 0, 102) +- hsb string; e.g. hsb(336, 100, 100) +- rgb object; e.g. { r: 255, g: 0, b: 102 } +- hsb object; e.g. { r: 336, g: 100, b: 100 } + +Note that when working with objects is important to provide all three values every time. + ## Animating elements @@ -409,7 +421,7 @@ rect.animate().move(200, 200) rect.animate().center(200, 200) ``` -### Animating along keyframes +### Synchronising animations If you want to perform your own actions during the animations you can use the `during()` method: ```javascript |