This repository contains PlantUML sprites generated from Gil Barbara's logos, which can easily be used in PlantUML diagrams for nice visual aid.
This project is inspired in other PlantUML sprites repositories like AWS-PlantUML and PlantUML Icon-Font Sprites. Check PlantUML stdlib for a list of other similar repositories included by default by PlantUML.
Just import the proper sprite into your PlantUML diagram and use it like any other sprite.
Example:
@startuml
!define SPRITESURL https://raw.githubusercontent.com/plantuml-stdlib/gilbarbara-plantuml-sprites/v1.1/sprites
!includeurl SPRITESURL/flask.puml
!includeurl SPRITESURL/kafka.puml
!includeurl SPRITESURL/kotlin.puml
!includeurl SPRITESURL/cassandra.puml
title Gil Barbara's logos example
skinparam monochrome true
rectangle "<$flask>\nwebapp" as webapp
queue "<$kafka>" as kafka
rectangle "<$kotlin>\ndaemon" as daemon
database "<$cassandra>" as cassandra
webapp -> kafka
kafka -> daemon
daemon --> cassandra
@enduml
The list of available sprites is here.
You can play around and test ideas with Online PlantUML Editor.
To use color with the logos, there are two options:
color
property set@startuml
!define SPRITESURL https://raw.githubusercontent.com/plantuml-stdlib/gilbarbara-plantuml-sprites/v1.1/sprites
!define IMAGESSURL https://raw.githubusercontent.com/plantuml-stdlib/gilbarbara-plantuml-sprites/v1.1/pngs
!includeurl SPRITESURL/github-octocat.puml
component "<$github-octocat> Regular Sprite" as A
component "<$github-octocat,color=#7EBDE7> Colored Sprite" as B
component "<img:IMAGESSURL/github-octocat.png> PNG Image" as C
@enduml
Sprites are built with provided svgsFolderUrl2plantUmlSprites.groovy script. To update sprites from icons in Gil Barbara's repo just re-run:
./svgsFolderUrl2plantUmlSprites.groovy https://github.com/gilbarbara/logos/tree/main/logos
In order to execute the build script within a Docker container, you may use the following command:
docker run -it --rm -v "$PWD:/home/groovy/scripts" -w /home/groovy/scripts groovy:4.0-jdk8 groovy svgsFolderUrl2plantUmlSprites.groovy https://github.com/gilbarbara/logos/tree/main/logos