const Green, Orange, Red, Grey
Colors a badge message can use.
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Package badge builds small flat SVG badges ("label | message") and turns them into data: URIs and Markdown images tha...
Package badge builds small flat SVG badges ("label | message") and turns them into data: URIs and Markdown images that gnoweb renders inline.
It is pure: no state, no realm imports. Text is XML-escaped and capped, and colors come from a fixed palette, so any input gives a well-formed, bounded SVG.
DataURI returns svg as a base64 data:image/svg+xml URI.
Markdown returns a Markdown image of svg with alt text alt. If link is not empty, the image links there. link must already be a safe URL.
SVG returns a badge with label on the left and message on the right, the message on color (one of the palette names; anything else is Grey).