summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-03-06 19:43:17 +0000
committerwout <wout@impinc.co.uk>2013-03-06 19:43:17 +0000
commit5e3ff072994d3d9b224c62d71ca1331951249bac (patch)
tree9bb8b5af1ca4372fcf0c03b0444530fefee20735 /README.md
parent6a8a3fee7dbfc9a9f4a36dc5877f955f5743a4ac (diff)
downloadsvg.js-5e3ff072994d3d9b224c62d71ca1331951249bac.tar.gz
svg.js-5e3ff072994d3d9b224c62d71ca1331951249bac.zip
Reworked color management
Diffstat (limited to 'README.md')
-rw-r--r--README.md14
1 files changed, 13 insertions, 1 deletions
diff --git a/README.md b/README.md
index 861ec80..bcaf63f 100644
--- a/README.md
+++ b/README.md
@@ -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