Textures.js is a JavaScript library for creating SVG patterns
Somewhat related I created a we component for CSS3 patterns: <a href="https://github.com/jwillmer/pattern-component" rel="nofollow">https://github.com/jwillmer/pattern-component</a>