https://github.com/silentsoft/badge4j
:art: Badge4J is a Java implementation of the badge-maker JavaScript library and is inspired by shields.io.
https://github.com/silentsoft/badge4j
badge badge-maker image shields-io svg
Last synced: 3 months ago
JSON representation
:art: Badge4J is a Java implementation of the badge-maker JavaScript library and is inspired by shields.io.
- Host: GitHub
- URL: https://github.com/silentsoft/badge4j
- Owner: silentsoft
- License: apache-2.0
- Created: 2021-07-03T03:49:46.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2026-01-26T00:31:09.000Z (6 months ago)
- Last Synced: 2026-01-26T16:09:15.553Z (6 months ago)
- Topics: badge, badge-maker, image, shields-io, svg
- Language: Java
- Homepage:
- Size: 182 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-badges - badge4j
README
# Badge4J
[](https://search.maven.org/artifact/org.silentsoft/badge4j)
[](https://app.travis-ci.com/silentsoft/badge4j)
[](https://sonarcloud.io/dashboard?id=silentsoft_badge4j)
[](https://sonarcloud.io/dashboard?id=silentsoft_badge4j)
[](https://hits.sh/github.com/silentsoft/badge4j/)
`Badge4J` is a Java implementation of the [badge-maker](https://www.npmjs.com/package/badge-maker) JavaScript library and is inspired by [shields.io](https://shields.io). This library also supports [simple-icons](https://simpleicons.org).
## Usage

```java
String svg = Badge.builder().label("hello").message("world").build();
```
## Available builder options
```java
Badge.builder()
.style(Style) /* Flat(default), FlatSquare, ForTheBadge, Plastic, Social */
.label(String)
.message(String)
.color(String)
.labelColor(String)
.logo(String) /* simple-icons slug or data:image/svg+xml;base64,.. */
.logoWidth(int)
.links(String[])
.build();
```
## Styles





## Colors
- Named color by shields.io
















- Any valid [CSS color](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value)
- named color
- 
- 
- etc.
- hexadecimal numbers
- 
- 
- etc.
- rgb[a](red, green, blue[, opacity])
- cmyk[a](cyan, magenta, yellow, black[, opacity])
- hsl[a](hue, saturation, lightness[, opacity])
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please note we have a [CODE_OF_CONDUCT](https://github.com/silentsoft/badge4j/blob/main/CODE_OF_CONDUCT.md), please follow it in all your interactions with the project.
## License
Please refer to [LICENSE](https://github.com/silentsoft/badge4j/blob/main/LICENSE.txt).