forthebadge / for-the-badge

It all started because of an obsession with two words: “build passing”. It all ended with this: badges, for badges’ sake.
https://forthebadge.com
GNU General Public License v3.0
1.81k stars 150 forks source link

Dynamically Generating Badges #140

Closed nikhilanayak closed 3 years ago

nikhilanayak commented 3 years ago

Sorry, this isn't really an issue/enhancement but I thought this would be the best place to ask a question. Is there a way I can generate a badge with the text Cool Badge with a red background (or any other badge)? I tried looking through the SVG but it wasn't very helpful to determine how to render each character individually.

sven-frotscher commented 3 years ago

You can generate them on https://shields.io.

For example, cool: badge is https://shields.io/badge/cool-badge-red?style=for-the-badge. And cool: badge is https://img.shields.io/static/v1?label=cool&message=badge&color=c13d3b&style=for-the-badge&labelColor=ea4761.

You may have to look up the colour codes for (e.g.) the correct red background for both parts, like I did for the second badge.

nikhilanayak commented 3 years ago

That's exactly what I was looking for. Thanks!