Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

initials Build Status

initials crate helps to generate customizable avatars with the initial characters from the names.

Setup and Usage

In your Cargo.toml, add the following:

[dependencies]
initials = "*"

Extern initials crate and draw the image on your project:

extern crate initials;

use initials::{AvatarBuilder, AvatarResult};

fn avatar() -> AvatarResult {
    AvatarBuilder::new("Avatar")
        .with_font_color("#000000")?
        .with_background_color("#FAFAFA")?
        .with_width(200)?
        .with_height(200)
}

fn main() {
    let avatar = avatar().unwrap();
    let image = avatar.draw();
    // use the generated image
}

See Documentation

Example

App | Doc

License

MIT

About

Initials avatar generator for Rust

Topics

Resources

Stars

26 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages