jGraduate is a jQuery 1.3 plugin that is similar to a color picker but can be used to define gradients, a paint that smoothly blends from one color to another. The gradient picker returns a JSON object that contains either a SVG linear gradient object or a color object (as returned by jPicker). The caller can then either importNode the gradient or utilize the color hex string in some way.
This plugin was conceived as part of the SVG-edit project and was made into a separate project.
jGraduate has two tabs: Solid Color and Linear Gradient. The Solid Color tab wraps jPicker (a color picker). The Linear Gradient tab has a similar picker for a simple linear gradient (with two stops).
- Future versions may handle radial gradients.
- Future versions may handle stop management (add/removing/editing stops)
- Future versions may be compatible with Internet Explorer (via svgweb)
- Future versions may be configurable to return the gradient in other formats (Webkit CSS, Canvas, VML)
- See our Planning document.
Feel free to open issues or submit patches.
See the test page for a demo of the trunk (0.2-preAlpha).