hashavatar 1.0.2

Stable deterministic procedural avatars in Rust with configurable identity hashing, WebP, optional PNG/JPEG/GIF, and SVG export
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use hashavatar::prelude::*;

fn main() -> Result<(), AvatarError> {
    let svg = AvatarBuilder::for_id("user@example.com")
        .size(256, 256)
        .namespace("tenant-a", "v2")
        .kind(AvatarKind::Robot)
        .background(AvatarBackground::Transparent)
        .accessory(AvatarAccessory::Glasses)
        .color(AvatarColor::Gold)
        .expression(AvatarExpression::Happy)
        .shape(AvatarShape::Circle)
        .render_svg()?;

    println!("{svg}");
    Ok(())
}