Shields badge specification, website and default API server
Go to file
2014-01-03 14:31:21 +01:00
img Single color input. 2014-01-03 14:17:19 +01:00
.gitignore Add SVGO to the pipeline 2014-01-02 18:25:34 +01:00
badges.json Requiring a single color in the badges JSON format. 2014-01-03 14:31:21 +01:00
make.js Automatic measurement of text. 2014-01-03 12:29:54 +01:00
Makefile Automate creation of SVG badges. 2014-01-02 17:53:17 +01:00
package.json Automatic measurement of text. 2014-01-03 12:29:54 +01:00
README.md Omit needless widths. 2014-01-03 12:39:40 +01:00
sheet.html [badge] Dependencies up-to-date. 2014-01-03 11:28:34 +01:00
template.svg Requiring a single color in the badges JSON format. 2014-01-03 14:31:21 +01:00

GitHub badges in SVG format

See https://github.com/h5bp/lazyweb-requests/issues/150.

Contribute

If you want to add a badge, only modify badges.json.

The format is the following:

/* Unique name of your badge. */
"build-passed": {
  /* Textual information shown, in order. */
  "text": [ "build", "passed" ],
  "colorscheme": "green"
}

Color schemes are located at the bottom of the file. Each scheme has a name and a series of color stops used to compute the gradient of the background color of the boxes.

"green": {
  /* Gradient of the background color of the second box.
     The main gradient is from index 1 to 2,
     indices 0 and 3 provide the light and dark outline. */
  "colorB": [ "#8f6", "#4c1", "#3b0", "#370" ]
}

Usually, the first box uses the same dark grey. Rely on this default by not providing a "colorA" field (such as above). Otherwise, the "colorA" field works exactly the same way.

You can also use the "colorA" and "colorB" fields directly in the badges if you don't want to make a color scheme for it. In that case, remove the "colorscheme" field altogether.

License

All work here is licensed CC0.