Created
December 24, 2015 05:20
-
-
Save ajmas/00e559254a41ee5d103b to your computer and use it in GitHub Desktop.
Drawing a rainbow gradient with snapSVG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
snap = Snap('#mySVG'); | |
gradient = snap.gradient('l(0, 0, 1, 0)red-orange-yellow-green-blue-indigo-violet'); | |
snap.rect(0,0,200,200).attr({ | |
fill: gradient | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment