summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 3 insertions, 12 deletions
diff --git a/README.md b/README.md
index 515c2eb..32e8208 100644
--- a/README.md
+++ b/README.md
@@ -959,18 +959,9 @@ Note: the `x` and `y` positions are tested against the relative position of the
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)
-```javascript
-var color = new SVG.Color('#f06')
-```
-- rgb string; e.g. rgb(255, 0, 102)
-```javascript
-var color = new SVG.Color('rgb(255, 0, 102)')
-```
-- rgb object; e.g. { r: 255, g: 0, b: 102 }
-```javascript
-var color = new SVG.Color({ r: 255, g: 0, b: 102 })
-```
+- hex string; three based (e.g. #f06) or six based (e.g. #ff0066) `new SVG.Color('#f06')`
+- rgb string; e.g. rgb(255, 0, 102) `new SVG.Color('rgb(255, 0, 102)')`
+- rgb object; e.g. { r: 255, g: 0, b: 102 } `new SVG.Color({ r: 255, g: 0, b: 102 })`
Note that when working with objects is important to provide all three values every time.