A legible & concise status badge solution for third-party codebase services.
Make your own badges here!
Many GitHub repos sport badges for things like:
- Travis CI build status:
- Gemnasium dependency checks:
- RubyGems released gem version:
As you can see from the zoomed 400% versions of these badges above, nobody is (really) using the same badge file and at normal size, they're hardly legible. Worst of all, they're completely inconsistent. The information provided isn't of the same kind on each badge. The context is blurry, which doesn't make for å straightforward understanding of how these badges are relevant to the project they're attached to and what information they provide.
As you can see below, without increasing the footprint of these badges, I've tried to increase legibility and coherence, removing useless text to decrease the horizontal length in the (likely) scenario that more of these badge thingies crop up on READMEs all across the land.
We have an effort to produce similar-looking SVGs through a web service at http://img.shields.io. That ensures that we are retina-ready.
What kind of meta data can you convey using badges?
- test build status:
build | failing
- code coverage percentage:
coverage | 80%
- stable release version:
version | 1.2.3
- package manager release:
gem | 1.2.3
- status of third-party dependencies:
dependencies | out-of-date
- static code analysis GPA:
code climate | 3.8
- semver version observance:
semver | 2.0.0
- amount of gittip donations per week:
tips | $2/week
Since one of the major concerns is legibility, it's impossible to ignore how badges will render on retina (high DPI) displays.
As suggested by @kneath, badges displayed with an HTML image tag (instead of the easier Markdown image tag) can be given a fixed height to force an image that is actually double the resolution into a 50% smaller image, which will display properly for both retina and non-retina screens.
Here's an example with the following code:
<img src="https://raw.github.com/badges/shields/master/static/shields_white@2x.png" height="143" alt="Retina-ready Shields example" />
All our badges aren't yet compatible with this but we're working on updating them soon. Look for image filenames with @2x
suffixes, those will be the pixel doubled versions.
Note: They were pixel doubled manually in Photoshop, not after the fact.
The font chosen in the specification is the Apache licensed Open Sans Regular available from Google Web Fonts.
See SPECIFICATION.md.
See INSTALL.md.
See CONTRIBUTING.md.
See LICENSE.md.