Skip to content

nathiss/svg_avatars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SVG avatars

master Crates.io docs.rs Crates.io

A Rust library for generating SVG avatars from identifiers.

Example

use svg_avatars::{Rings, SvgAvatarBuilder};

fn main() {
    let svg = SvgAvatarBuilder::new()
        .identifier("foo")
        .rings(Rings::Three)
        .stroke_color("black")
        .build();

    svg.save("bar.svg").unwrap();
}

This produces the bar.svg file with the following content:

three rings example

License

MIT; see the LICENSE.txt file.