{"id":13408009,"url":"https://github.com/bokub/gradient-badge","last_synced_at":"2025-05-07T09:25:36.676Z","repository":{"id":45819285,"uuid":"144710557","full_name":"bokub/gradient-badge","owner":"bokub","description":"🍭 Badge generator with color gradient support","archived":false,"fork":false,"pushed_at":"2024-09-06T07:49:41.000Z","size":683,"stargazers_count":74,"open_issues_count":6,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-15T11:38:38.909Z","etag":null,"topics":["badge","badgen","gradient","readme","readme-badges","shield"],"latest_commit_sha":null,"homepage":"https://git.io/gradientbadge","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bokub.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-14T11:22:54.000Z","updated_at":"2024-12-22T04:19:47.000Z","dependencies_parsed_at":"2024-10-14T04:12:43.859Z","dependency_job_id":"e1e2e1ef-2985-489a-92a4-9df8a6bddbfe","html_url":"https://github.com/bokub/gradient-badge","commit_stats":{"total_commits":24,"total_committers":1,"mean_commits":24.0,"dds":0.0,"last_synced_commit":"2c8a4c54d481c3a41693d4e2bdae48c200691642"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokub%2Fgradient-badge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokub%2Fgradient-badge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokub%2Fgradient-badge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokub%2Fgradient-badge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bokub","download_url":"https://codeload.github.com/bokub/gradient-badge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252849345,"owners_count":21813804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["badge","badgen","gradient","readme","readme-badges","shield"],"created_at":"2024-07-30T20:00:50.146Z","updated_at":"2025-05-07T09:25:36.656Z","avatar_url":"https://github.com/bokub.png","language":"JavaScript","readme":"# gradient-badge\n\n[![npm][version]](https://www.npmjs.com/package/gradient-badge)\n[![Build][build]](https://travis-ci.org/bokub/gradient-badge)\n[![Coverage][coverage]](https://codecov.io/gh/bokub/gradient-badge)\n[![Demo][demo-src]][demo]\n[![code style][prettier]](https://github.com/prettier/prettier)\n\n\u003e Badge generator with gradient support 🍭\n\n#### Check out the [demo][demo] to make your own badge\n\n## Install\n\n```\n$ npm i gradient-badge\n```\n\n## Usage\n\n**gradient-badge** works exactly like [badgen](https://github.com/badgen/badgen), with the **`gradient`** parameter in addition.\n\n**Node.js**\n\n```javascript\nconst gradientBadge = require('gradient-badge');\n\nconst svgString = gradientBadge({\n    subject: 'version', // \u003ctext\u003e\n    status: 'v1.2.3', // \u003ctext\u003e\n    style: 'flat', // 'flat' or undefined, optional\n    // And any other parameter supported by badgen (icon, scale...)\n    gradient: ['pink', 'F78642'], // array of colors (Hexadecimal or name)\n});\n```\n\n**Browser**\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/gradient-badge\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    var svgString = gradientBadge({\n        /* same as above */\n    });\n\u003c/script\u003e\n```\n\nResult: ![Result][usage]\n\n### Adding a gradient to a badge\n\nYou can apply a color gradient to any badge already generated with badgen:\n\n```javascript\nconst { badgen } = require('badgen');\nconst { applyGradient } = require('gradient-badge');\n\nconst originalBadge = badgen({\n    /* ... */\n});\nconst svgString = applyGradient(originalBadge, ['B65CFF', 'cyan']);\n```\n\n## Examples\n\nHere are a few more examples of what you can do.\n\n#### Check out the [demo][demo] to make your own\n\n![Stars][stars] ![Standard][standard] ![Patreon][patreon] ![Instagram][instagram] ![Vue.js][vue] ![Rainbow][rainbow]\n\n## Dependencies\n\n-   [badgen](https://github.com/badgen/badgen) - Fast handcraft svg badge generator.\n\n## See also\n\n-   [badge-action](https://github.com/emibcn/badge-action) - Create a badge using GitHub Actions.\n\n[version]: https://gradgen.bokub.workers.dev/npm/v/gradient-badge?gradient=b65cff,11cbfa\n[demo-src]: https://gradgen.bokub.workers.dev/badge/demo/available?gradient=ffb836,fc6d60\n[prettier]: https://gradgen.bokub.workers.dev/badge/code%20style/prettier?gradient=ff94c8,cacfda,61eddb\n[build]: https://gradgen.bokub.workers.dev/github/checks/bokub/gradient-badge?gradient=ff9eec,d0a1fc\n[coverage]: https://gradgen.bokub.workers.dev/codecov/c/github/bokub/gradient-badge?gradient=00db78,10cde6\n[usage]: https://gradgen.bokub.workers.dev/badge/version/v1.2.3?gradient=pink,F78642\u0026style=flat\n[demo]: https://git.io/gradientbadge\n[stars]: https://gradgen.bokub.workers.dev/badge/stars/★★★★☆?gradient=00a65e,abf269\n[standard]: https://gradgen.bokub.workers.dev/badge/code%20style/standard?gradient=ff22aa,bf00ff\u0026style=flat\n[patreon]: https://gradgen.bokub.workers.dev/badge/become/a%20patron?gradient=f96854,f9be75\n[instagram]: https://gradgen.bokub.workers.dev/badge/follow%20me/instagram?gradient=833ab4,fd1d1d,fcb045\n[vue]: https://gradgen.bokub.workers.dev/badge/built%20with/Vue.js?gradient=42b883,35495e\u0026style=flat\n[rainbow]: https://gradgen.bokub.workers.dev/badge/rainbow/compatible?gradient=ff4564,ffa82e,ffff00,21ed28,19ffa7,2edcff,5490ff,a787ff,ea8fff,ff5e84\n\n","funding_links":[],"categories":["🧩 Badges 👇","Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbokub%2Fgradient-badge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbokub%2Fgradient-badge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbokub%2Fgradient-badge/lists"}