svg_avatars

Crates.iosvg_avatars
lib.rssvg_avatars
version0.1.3
sourcesrc
created_at2024-02-14 17:05:42.370045
updated_at2024-02-21 16:37:56.511961
descriptionA Rust library for generating SVG avatars from identifiers.
homepagehttps://github.com/nathiss/svg_avatars
repositoryhttps://github.com/nathiss/svg_avatars
max_upload_size
id1140032
size25,274
Kamil Rusin (nathiss)

documentation

README

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.

Commit count: 0

cargo fmt