initials

Crates.ioinitials
lib.rsinitials
version0.1.2
sourcesrc
created_at2018-10-20 10:19:45.612322
updated_at2018-10-20 21:56:40.463963
descriptioninitials avatar for rust
homepagehttps://github.com/sonmezonur/initials.rs
repositoryhttps://github.com/sonmezonur/initials.rs.git
max_upload_size
id91638
size11,824,642
Onur Sönmez (sonmezonur)

documentation

https://sonmezonur.github.io/initials.rs

README

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

Commit count: 25

cargo fmt