Skip to content

🎨 Badge4J is a Java implementation of the badge-maker JavaScript library and is inspired by shields.io.

License

Notifications You must be signed in to change notification settings

silentsoft/badge4j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Badge4J

Maven Central Build Status Quality Gate Status Coverage Hits

Badge4J is a Java implementation of the badge-maker JavaScript library and is inspired by shields.io. This library also supports simple-icons.

Usage

String svg = Badge.builder().label("hello").message("world").build();

Available builder options

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

    • 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])

Maven Central

<dependency>
    <groupId>org.silentsoft</groupId>
    <artifactId>badge4j</artifactId>
    <version>1.11.0</version>
</dependency>

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, please follow it in all your interactions with the project.

License

Please refer to LICENSE.

About

🎨 Badge4J is a Java implementation of the badge-maker JavaScript library and is inspired by shields.io.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages