Skip to content

robinbakker/svg-label

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏷️ SVG label

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)

labels are cool

Options

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

About

Simple SVG labels from your own Worker

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published