This is a Cloudflare Worker project to get a simple customized SVG label that can be used in Markdown.
You can setup your own worker at Cloudflare (currently 100,000 requests per day for free). You could use this project and use the Cloudflare CLI (Wrangler) to publish.
Pass the options as query string parameters, so you can use it like this;
![labels](https://[worker-name].[your-own-account].workers.dev/?text=labels&bgcolor=00f&textcolor=fff)
Param | Description |
---|---|
text | The text of the label |
textcolor | Hex text color code, default "fff" (white) |
bgcolor | Hex background color code, default "f00" (red) |
fontsize | Font size in pixels, default 16px |
fontweight | Font weight numeric value, default 600 (bold) |
width | Pixel width, by default slightly based on number of characters (text) |
height | Numeric value for pixel height, by default based on font size |
Heavily inspired by "svg-labels" from Bryan Housel - see https://github.com/bhousel/svg-labels