{"versions":{"1.0.2":{"name":"gradient-parser","version":"1.0.2","description":"Parse CSS3 gradient definitions and return an AST.","author":{"name":"Rafael Carcicio","email":"rafael@caricio.com","url":"https://github.com/rafaelcaricio"},"homepage":"https://github.com/rafaelcaricio/gradient-parser","bugs":{"url":"https://github.com/rafaelcaricio/gradient-parser/issues"},"licenses":[{"type":"MIT","url":"http://rafaelcaricio.mit-license.org"}],"maintainers":[{"name":"anonymous","email":"rafael@caricio.com"}],"contributors":[],"repository":{"type":"git","url":"git://github.com/rafaelcaricio/gradient-parser.git"},"main":"build/node.js","scripts":{"test":"grunt"},"keywords":["library","css3","parser"],"devDependencies":{"expect.js":"*","grunt":"*","grunt-browserify":"^3.0.1","grunt-complexity":"*","grunt-contrib-concat":"^0.5.0","grunt-contrib-uglify":"^0.5.1","grunt-mocha-test":"^0.11.0","mocha":"*"},"engines":{"node":">=0.10.0"},"gitHead":"cce801d1df27261f998230bec29f0d8c8eeb682a","_id":"gradient-parser@1.0.2","_nodeVersion":"12.18.4","_npmVersion":"7.6.3","dist":{"shasum":"d283b80390386e2613c992bb0e5abb259aedf25f","size":8725,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/gradient-parser/-/gradient-parser-1.0.2.tgz","integrity":"sha512-gR6nY33xC9yJoH4wGLQtZQMXDi6RI3H37ERu7kQCVUzlXjNedpZM7xcA489Opwbq0BSGohtWGsWsntupmxelMg=="},"_npmUser":{"name":"anonymous","email":"rafael@caricio.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-parser_1.0.2_1615816528930_0.5350301859221112"},"_hasShrinkwrap":false,"publish_time":1615816529060,"_cnpm_publish_time":1615816529060,"_cnpmcore_publish_time":"2021-12-17T13:20:18.895Z"},"1.0.1":{"name":"gradient-parser","version":"1.0.1","description":"Parse CSS3 gradient definitions and return an AST.","author":{"name":"Rafael Carcicio","email":"rafael@caricio.com","url":"https://github.com/rafaelcaricio"},"homepage":"https://github.com/rafaelcaricio/gradient-parser","bugs":{"url":"https://github.com/rafaelcaricio/gradient-parser/issues"},"licenses":[{"type":"MIT","url":"http://rafaelcaricio.mit-license.org"}],"maintainers":[{"name":"anonymous","email":"rafael@caricio.com"}],"contributors":[],"repository":{"type":"git","url":"git://github.com/rafaelcaricio/gradient-parser.git"},"main":"build/node.js","scripts":{"test":"grunt"},"keywords":["library","css3","parser"],"dependencies":{},"devDependencies":{"grunt":"*","grunt-browserify":"^3.0.1","grunt-complexity":"*","grunt-contrib-concat":"^0.5.0","grunt-contrib-uglify":"^0.5.1","grunt-mocha-test":"^0.11.0","mocha":"*"},"engines":{"node":">=0.10.0"},"gitHead":"c4ba2836b641e69c15b4034ae7a2c1c96fc08743","_id":"gradient-parser@1.0.1","_nodeVersion":"12.18.4","_npmVersion":"6.14.11","dist":{"shasum":"b583e09773b9d076330a37c39adad59e067bb7e7","size":8711,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/gradient-parser/-/gradient-parser-1.0.1.tgz","integrity":"sha512-hEvh69Wg3iWKAX4fJlozSTtZrE1HRjfxK3rNbuEqJNRf3csdlF2aUrp2rA/Z0QtGxkdvMFCIYS1tgMiGqXpepQ=="},"_npmUser":{"name":"anonymous","email":"rafael@caricio.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-parser_1.0.1_1613825543278_0.8585970457903682"},"_hasShrinkwrap":false,"publish_time":1613825543461,"_cnpm_publish_time":1613825543461,"_cnpmcore_publish_time":"2021-12-17T13:20:19.124Z"},"1.0.0":{"name":"gradient-parser","version":"1.0.0","description":"Parse CSS3 gradient definitions and return an AST.","author":{"name":"Rafael Carcicio","email":"rafael@caricio.com","url":"https://github.com/rafaelcaricio"},"homepage":"https://github.com/rafaelcaricio/gradient-parser","bugs":{"url":"https://github.com/rafaelcaricio/gradient-parser/issues"},"licenses":[{"type":"MIT","url":"http://rafaelcaricio.mit-license.org"}],"maintainers":[{"name":"anonymous","email":"rafael@caricio.com"}],"contributors":[],"repository":{"type":"git","url":"git://github.com/rafaelcaricio/gradient-parser.git"},"main":"build/node.js","scripts":{"test":"grunt"},"keywords":["library","css3","parser"],"dependencies":{},"devDependencies":{"grunt":"*","grunt-browserify":"^3.0.1","grunt-complexity":"*","grunt-contrib-concat":"^0.5.0","grunt-contrib-uglify":"^0.5.1","grunt-mocha-test":"^0.11.0","mocha":"*"},"engines":{"node":">=0.10.0"},"gitHead":"04708dcb4592dda7004970cd699083446f43d680","_id":"gradient-parser@1.0.0","_nodeVersion":"12.18.4","_npmVersion":"6.14.11","dist":{"shasum":"c55ad3e08ca9c143da68199a0e0c9aa10e655ec2","size":8721,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/gradient-parser/-/gradient-parser-1.0.0.tgz","integrity":"sha512-jgzhZ031DXZ8PpVfl3Ir9YiHJ8NDF+SwO1nmwnvOyi8ACZ6dxztQ/X71Rmx+rUG0HhKCXVIl6sppOz3C2u360w=="},"_npmUser":{"name":"anonymous","email":"rafael@caricio.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gradient-parser_1.0.0_1611146855866_0.79289207754319"},"_hasShrinkwrap":false,"publish_time":1611146855980,"_cnpm_publish_time":1611146855980,"_cnpmcore_publish_time":"2021-12-17T13:20:19.345Z"},"0.1.5":{"name":"gradient-parser","version":"0.1.5","description":"Parse CSS3 gradient definitions and return an AST.","author":{"name":"Rafael Carcicio","email":"rafael@caricio.com","url":"https://github.com/rafaelcaricio"},"homepage":"https://github.com/rafaelcaricio/gradient-parser","bugs":{"url":"https://github.com/rafaelcaricio/gradient-parser/issues"},"licenses":[{"type":"MIT","url":"http://rafaelcaricio.mit-license.org"}],"maintainers":[{"name":"anonymous","email":"rafael@caricio.com"}],"contributors":[],"repository":{"type":"git","url":"git://github.com/rafaelcaricio/gradient-parser.git"},"main":"build/node.js","scripts":{"test":"grunt"},"keywords":["library","css3","parser"],"dependencies":{},"devDependencies":{"grunt":"*","grunt-browserify":"^3.0.1","grunt-complexity":"*","grunt-contrib-concat":"^0.5.0","grunt-contrib-uglify":"^0.5.1","grunt-mocha-test":"^0.11.0","mocha":"*"},"engines":{"node":">=0.10.0"},"gitHead":"cb2e9e03f6c0acea3151ccdb6b04ddf1ab1a4932","_id":"gradient-parser@0.1.5","_shasum":"0c7e2179559e5ce7d8d71f4423af937100b2248c","_from":".","_npmVersion":"1.4.15","_npmUser":{"name":"anonymous","email":"rafael@caricio.com"},"dist":{"shasum":"0c7e2179559e5ce7d8d71f4423af937100b2248c","size":7129,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/gradient-parser/-/gradient-parser-0.1.5.tgz","integrity":"sha512-+uPlcVbjrKOnTzvz0MjTj7BfACj8OmxIa1moIjJV7btvhUMSJk0D47RfDCgDrZE3dYMz9Cf5xKJwnrKLjUq0KQ=="},"directories":{},"publish_time":1410451329389,"_hasShrinkwrap":false,"_cnpm_publish_time":1410451329389,"_cnpmcore_publish_time":"2021-12-17T13:20:19.593Z"},"0.1.4":{"name":"gradient-parser","version":"0.1.4","description":"Parse CSS3 gradient definitions and return an AST.","author":{"name":"Rafael Carcicio","email":"rafael@caricio.com","url":"https://github.com/rafaelcaricio"},"homepage":"https://github.com/rafaelcaricio/gradient-parser","bugs":{"url":"https://github.com/rafaelcaricio/gradient-parser/issues"},"licenses":[{"type":"MIT","url":"http://rafaelcaricio.mit-license.org"}],"maintainers":[{"name":"anonymous","email":"rafael@caricio.com"}],"contributors":[],"repository":{"type":"git","url":"git://github.com/rafaelcaricio/gradient-parser.git"},"main":"build/node.js","scripts":{"test":"grunt"},"keywords":["library","css3","parser"],"dependencies":{},"devDependencies":{"grunt":"*","grunt-browserify":"^3.0.1","grunt-complexity":"*","grunt-contrib-concat":"^0.5.0","grunt-contrib-uglify":"^0.5.1","grunt-mocha-test":"^0.11.0","mocha":"*"},"engines":{"node":">=0.10.0"},"gitHead":"8675ce856f0d0c75e511f216db0a7adb2f02a61b","_id":"gradient-parser@0.1.4","_shasum":"67e8cc06c59e10026595f25f439f815b710276e2","_from":".","_npmVersion":"1.4.15","_npmUser":{"name":"anonymous","email":"rafael@caricio.com"},"dist":{"shasum":"67e8cc06c59e10026595f25f439f815b710276e2","size":7089,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/gradient-parser/-/gradient-parser-0.1.4.tgz","integrity":"sha512-04N90bHxvsiBOv+BZF19du56thLRgqb9G69/Xo3BeaIAA+e58dZns0bApuPO8jj8W/hqw8/hJE95Y/bBqCmepg=="},"directories":{},"publish_time":1410450475112,"_hasShrinkwrap":false,"_cnpm_publish_time":1410450475112,"_cnpmcore_publish_time":"2021-12-17T13:20:19.829Z"},"0.1.2":{"name":"gradient-parser","version":"0.1.2","description":"Parse CSS3 gradient definitions and return an AST.","author":{"name":"Rafael Carcicio","email":"rafael@caricio.com","url":"https://github.com/rafaelcaricio"},"homepage":"https://github.com/rafaelcaricio/gradient-parser","bugs":{"url":"https://github.com/rafaelcaricio/gradient-parser/issues"},"licenses":[{"type":"MIT","url":"http://rafaelcaricio.mit-license.org"}],"maintainers":[{"name":"anonymous","email":"rafael@caricio.com"}],"contributors":[],"repository":{"type":"git","url":"git://github.com/rafaelcaricio/gradient-parser.git"},"main":"build/node.js","scripts":{"test":"grunt"},"keywords":["library","css3","parser"],"dependencies":{},"devDependencies":{"grunt":"*","grunt-browserify":"^3.0.1","grunt-complexity":"*","grunt-contrib-concat":"^0.5.0","grunt-contrib-uglify":"^0.5.1","grunt-mocha-test":"^0.11.0","mocha":"*"},"engines":{"node":">=0.10.0"},"gitHead":"f3de5fc9b63a50d85620a0494ea6cdc4e9664178","_id":"gradient-parser@0.1.2","_shasum":"de20a9bc05c15ea54074a724f13349fe9f917131","_from":".","_npmVersion":"1.4.15","_npmUser":{"name":"anonymous","email":"rafael@caricio.com"},"dist":{"shasum":"de20a9bc05c15ea54074a724f13349fe9f917131","size":7067,"noattachment":false,"tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/gradient-parser/-/gradient-parser-0.1.2.tgz","integrity":"sha512-AnLncRrYWxSP9oa4tahbC6xP7ztJYK0TNaNXwFGiNexyqv9qirPTLlKUCeGVuNYnrua+J7LrhJ+icEiY268aIg=="},"directories":{},"publish_time":1410346028606,"_hasShrinkwrap":false,"_cnpm_publish_time":1410346028606,"_cnpmcore_publish_time":"2021-12-17T13:20:20.057Z"},"1.1.0":{"name":"gradient-parser","version":"1.1.0","description":"Parse CSS3 gradient definitions and return an AST.","author":{"name":"Rafael Carcicio","email":"rafael@caricio.com","url":"https://github.com/rafaelcaricio"},"homepage":"https://github.com/rafaelcaricio/gradient-parser","bugs":{"url":"https://github.com/rafaelcaricio/gradient-parser/issues"},"licenses":[{"type":"MIT","url":"http://rafaelcaricio.mit-license.org"}],"maintainers":[{"name":"anonymous","email":"rafael@caricio.com"}],"contributors":[],"repository":{"type":"git","url":"git://github.com/rafaelcaricio/gradient-parser.git"},"main":"build/node.js","scripts":{"test":"mocha spec/**/*.js","build":"node build.js","build:node":"node build.js --node","build:web":"node build.js --web","build:minify":"node build.js --minify","start":"python -m SimpleHTTPServer 3000","prepublish":"npm run build"},"keywords":["library","css3","parser"],"devDependencies":{"expect.js":"^0.3.1","esbuild":"^0.20.2","mocha":"^10.3.0"},"engines":{"node":">=0.10.0"},"_id":"gradient-parser@1.1.0","gitHead":"3720c974b4c89cfa6e44f8e03e3b9bfa38fef70e","_nodeVersion":"23.3.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-EbYqkj3f8uKH4HzhpGiSRF7whNJNBa7FziZWN9WPKI0dvZEreWQijhjuq9e5BMgZC/ua261W0GJyfR9R2b7oPQ==","shasum":"a6f28961e6621ca2a6febc5995c609b8a5aab348","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/gradient-parser/-/gradient-parser-1.1.0.tgz","fileCount":18,"unpackedSize":75641,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFSwoTE8hwT+S6SK8sEVtRuVMDAEV3gPSrh2vCcySUAJAiA5zJ8lmr2ylcLZEzSd52sBdgIWP8KyUJY7m1LszFKCQw=="}],"size":14174},"_npmUser":{"name":"anonymous","email":"rafael@caricio.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gradient-parser_1.1.0_1745094218087_0.16346776087540382"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-04-19T20:23:38.278Z","publish_time":1745094218278,"_source_registry_name":"default"},"1.1.1":{"name":"gradient-parser","version":"1.1.1","description":"Parse CSS3 gradient definitions and return an AST.","author":{"name":"Rafael Carcicio","email":"rafael@caricio.com","url":"https://github.com/rafaelcaricio"},"homepage":"https://github.com/rafaelcaricio/gradient-parser","bugs":{"url":"https://github.com/rafaelcaricio/gradient-parser/issues"},"licenses":[{"type":"MIT","url":"http://rafaelcaricio.mit-license.org"}],"maintainers":[{"name":"anonymous","email":"rafael@caricio.com"}],"contributors":[],"repository":{"type":"git","url":"git://github.com/rafaelcaricio/gradient-parser.git"},"main":"build/node.js","scripts":{"test":"mocha spec/**/*.js","build":"node build.js","build:node":"node build.js --node","build:web":"node build.js --web","build:minify":"node build.js --minify","start":"python -m SimpleHTTPServer 3000","prepublish":"npm run build"},"keywords":["library","css3","parser"],"devDependencies":{"expect.js":"^0.3.1","esbuild":"^0.25.0","mocha":"^10.3.0"},"engines":{"node":">=0.10.0"},"_id":"gradient-parser@1.1.1","gitHead":"b675d7b4ec4213cfdc2ce6e1f92a9efe0537552d","_nodeVersion":"23.3.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-Hu0YfNU+38EsTmnUfLXUKFMXq9yz7htGYpF4x+dlbBhUCvIvzLt0yVLT/gJRmvLKFJdqNFrz4eKkIUjIXSr7Tw==","shasum":"f0bc68eb9ff3e88ade1a0709a9c7a4c4d35af56e","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/gradient-parser/-/gradient-parser-1.1.1.tgz","fileCount":15,"unpackedSize":92246,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDUC2+1D7JzitLpdqDzfGvtRyvXh3ocXHx9arjFZfI80QIhAOp1cOstl8a/ZjoC44SSNyVYgqjzJiqxmMGygYGg2JAk"}],"size":16249},"_npmUser":{"name":"anonymous","email":"rafael@caricio.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gradient-parser_1.1.1_1745109079517_0.21223363195538392"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2025-04-20T00:31:19.716Z","publish_time":1745109079716,"_source_registry_name":"default"},"1.2.0":{"name":"gradient-parser","version":"1.2.0","description":"Parse CSS3 gradient definitions and return an AST.","author":{"name":"Rafael Carcicio","email":"rafael@caricio.com","url":"https://github.com/rafaelcaricio"},"homepage":"https://github.com/rafaelcaricio/gradient-parser","bugs":{"url":"https://github.com/rafaelcaricio/gradient-parser/issues"},"licenses":[{"type":"MIT","url":"http://rafaelcaricio.mit-license.org"}],"maintainers":[{"name":"anonymous","email":"rafael@caricio.com"}],"contributors":[],"repository":{"type":"git","url":"git://github.com/rafaelcaricio/gradient-parser.git"},"main":"build/node.js","module":"build/esm.mjs","types":"index.d.ts","exports":{".":{"import":"./build/esm.mjs","require":"./build/node.js","types":"./index.d.ts"}},"scripts":{"test":"mocha spec/**/*.js","pretest":"npm run build","build":"node build.js","build:node":"node build.js --node","build:web":"node build.js --web","build:minify":"node build.js --minify","start":"python3 -m http.server 3000","prepublish":"npm run build"},"keywords":["library","css","css3","parser","gradient"],"devDependencies":{"expect.js":"^0.3.1","esbuild":"^0.25.0","mocha":"^10.3.0"},"engines":{"node":">=0.10.0"},"_id":"gradient-parser@1.2.0","gitHead":"b1f68a1d85444cf25ba4c4fa82af8d0069d55c0e","_nodeVersion":"23.3.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-6ABGa9CR7WR/0pAJicBy5SJkiikbFM6kf/JjykwX7x+t+s8ORWVnlbi6FkHeFFb36yWsjUpHqSYrygd7ofEUqA==","shasum":"5ef7e57c500c356c8325916200f75f0fd64dfa10","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/gradient-parser/-/gradient-parser-1.2.0.tgz","fileCount":17,"unpackedSize":146202,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDSGW8+4X5pGvPTMFnHMunzZP4ZfGTokKNCrMxViwsVWAIhANrsx8/B99HJzzfeDEJ+AlI+DwT3IQf0UZp670occCzG"}],"size":23958},"_npmUser":{"name":"anonymous","email":"rafael@caricio.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/gradient-parser_1.2.0_1772202107454_0.012215098212109199"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-02-27T14:21:47.595Z","publish_time":1772202107595,"_source_registry_name":"default"}},"dist-tags":{"latest":"1.2.0"},"name":"gradient-parser","time":{"created":"2022-01-26T23:37:11.068Z","modified":"2026-02-27T14:21:57.671Z","1.0.2":"2021-03-15T13:55:29.060Z","1.0.1":"2021-02-20T12:52:23.461Z","1.0.0":"2021-01-20T12:47:35.980Z","0.1.5":"2014-09-11T16:02:09.389Z","0.1.4":"2014-09-11T15:47:55.112Z","0.1.2":"2014-09-10T10:47:08.606Z","1.1.0":"2025-04-19T20:23:38.278Z","1.1.1":"2025-04-20T00:31:19.716Z","1.2.0":"2026-02-27T14:21:47.595Z"},"readme":"# Gradient Parser\n\n[![npm version](https://badge.fury.io/js/gradient-parser.svg)](https://badge.fury.io/js/gradient-parser)\n\n## About\n\nParse CSS gradient definitions and return an AST `object`.\n\n## Examples\n\n```JavaScript\n  var gradient = require('gradient-parser');\n  var obj = gradient.parse('linear-gradient(30deg, #000, transparent)');\n  console.log(JSON.stringify(obj, null, 2));\n```\n\nResults in:\n\n```JSON\n[\n  {\n    \"type\": \"linear-gradient\",\n    \"orientation\": {\n      \"type\": \"angular\",\n      \"value\": \"30\",\n      \"unit\": \"deg\"\n    },\n    \"colorStops\": [\n      {\n        \"type\": \"hex\",\n        \"value\": \"000\"\n      },\n      {\n        \"type\": \"literal\",\n        \"value\": \"transparent\"\n      }\n    ]\n  }\n]\n```\n\n## Installation\n\nInstall via npm:\n```bash\nnpm install gradient-parser\n```\n\nImport in Node.js (CommonJS):\n```javascript\nconst gradient = require('gradient-parser');\n```\n\nImport in Node.js (ESM):\n```javascript\nimport { parse, stringify } from 'gradient-parser';\n```\n\nFor browser usage:\n```html\n<script src=\"node_modules/gradient-parser/build/web.js\"></script>\n```\n\nOr [download the zip](https://github.com/rafaelcaricio/gradient-parser/archive/master.zip)\n\n## Development\n\n### Project Status\n\nGradient-parser has been modernized (as of v1.1.0):\n- Removed Bower support in favor of npm exclusively\n- Replaced Grunt with a modern build system using esbuild\n- Added minification support\n- Updated dependencies to specific versions\n- Improved npm scripts for better developer experience\n\n### Build\n\nGradient-parser uses a modern build system with esbuild for building and minification.\n\n```bash\n# Build both Node.js and web bundles\nnpm run build\n\n# Build only Node.js bundle\nnpm run build:node\n\n# Build only web bundle\nnpm run build:web\n\n# Build minified bundles\nnpm run build:minify\n```\n\n### Testing\n\nRun the test suite with:\n\n```bash\nnpm test\n```\n\nThe build step runs automatically before tests via the `pretest` script.\n\n### Starting a local server\n\nYou can run a simple HTTP server for development:\n\n```bash\nnpm start\n```\n\n## API\n\n### gradient.parse(gradientString)\n\nAccepts a CSS gradient definition as declared in `background-image` and returns an AST as an `Array` of gradient nodes.\n\n```javascript\nvar ast = gradient.parse('linear-gradient(to right, red, blue)');\n```\n\n### gradient.stringify(ast)\n\nAccepts an AST (as returned by `parse`) and serializes it back into a CSS gradient string.\n\n```javascript\nvar css = gradient.stringify(ast);\n// => 'linear-gradient(to right, red, blue)'\n```\n\nRound-trip is supported:\n```javascript\ngradient.stringify(gradient.parse(input)) === input\n```\n\n## AST\n\n### Common properties\n\nAll nodes have the following properties.\n\n#### type\n\n`String`. The possible values are the ones listed in the Types section below.\n\n### Types\n\nThe available values of `node.type` are listed below, as well as the available properties of each node (other than the common properties listed above).\n\n### linear-gradient\n\n- orientation: `Object` or `undefined`. Possible types `directional` or `angular`.\n- colorStops: `Array` of color stops.\n\n### repeating-linear-gradient\n\n- orientation: `Object` or `undefined`. Possible types `directional` or `angular`.\n- colorStops: `Array` of color stops.\n\n### radial-gradient\n\n- orientation: `Array` or `undefined`. `Array` of possible types `shape`, `default-radial`, `extent-keyword`.\n- colorStops: `Array` of color stops.\n\n### repeating-radial-gradient\n\n- orientation: `Array` or `undefined`. `Array` of possible types `shape`, `default-radial`, `extent-keyword`.\n- colorStops: `Array` of color stops.\n\n### conic-gradient\n\n- orientation: `Object` or `undefined` of type `conic`.\n- colorStops: `Array` of color stops.\n\n### repeating-conic-gradient\n\n- orientation: `Object` or `undefined` of type `conic`.\n- colorStops: `Array` of color stops.\n\n### Color Stops\n\nEach color stop has the following properties:\n\n- type: `String` one of `literal`, `hex`, `rgb`, `rgba`, `hsl`, `hsla`, `var`.\n- value: the color value (type varies, see color types below).\n- length: `Object` or `undefined`. Position of the color stop (see length types).\n- length2: `Object` or `undefined`. Second position for dual-position color stops.\n\n### directional\n\n- value: `String` possible values `left`, `top`, `bottom`, `right`, `left top`, `left bottom`, `right top`, `right bottom`, `top left`, `top right`, `bottom left`, `bottom right`.\n\n### angular\n\n- value: `String` numeric value of the angle.\n- unit: `String` one of `deg`, `rad`, `grad`, `turn`.\n\n### conic\n\n- angle: `Object` or `undefined` of type `angular`.\n- at: `Object` or `undefined` of type `position`.\n\n### literal\n\n- value: `String` literal name of the color.\n\n### hex\n\n- value: `String` hex value (3, 4, 6, or 8 digits, without `#` prefix).\n\n### rgb\n\n- value: `Array` of length 3 of `String` numbers.\n\n### rgba\n\n- value: `Array` of length 4 of `String` numbers.\n\n### hsl\n\n- value: `Array` of length 3: `[hue, saturation, lightness]`. Hue is a `String` number, saturation and lightness are `String` numbers without the `%` suffix.\n\n### hsla\n\n- value: `Array` of length 4: `[hue, saturation, lightness, alpha]`. Same as `hsl` with an additional alpha `String` number.\n\n### var\n\n- value: `String` the CSS custom property name (e.g. `--color-red`).\n\n### calc\n\n- type: `'calc'`\n- value: `String` the raw calc expression content (e.g. `50% + 25px`).\n\n### shape\n\n- style: `Object` or `undefined` possible types `extent-keyword`, `px`, `em`, `rem`, `%`, `position`, or `position-keyword`.\n- value: `String` possible values `ellipse` or `circle`.\n- at: `Object` or `undefined` of type `position`.\n\n### default-radial\n\n- at: `Object` of type `position`.\n\n### position\n\n- value: `Object` with `x` and `y` properties, each a length/keyword node.\n\n### position-keyword\n\n- value: `String` possible values `center`, `left`, `top`, `bottom`, or `right`.\n\n### extent-keyword\n\n- value: `String` possible values `closest-side`, `closest-corner`, `farthest-side`, `farthest-corner`, `contain`, or `cover`.\n\n### Length types\n\nLength nodes can be any of: `px`, `em`, `rem`, `vw`, `vh`, `vmin`, `vmax`, `ch`, `ex`, `%`, `calc`.\n\n- value: `String` numeric value (for `calc`, the expression string).\n\n## License\n\n(The MIT License)\n\nCopyright (c) 2014-2025 Rafael Caricio rafael@caricio.com\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","users":{}}