initials-revamped
is a fork from the initials
crate that allows generating customizable avatars with the initial characters from arbitrary name values.
initials
to initials-revamped
~write_to
method to write raw bytes data to an array~In your Cargo.toml, add the following:
toml
[dependencies]
initials_revamped = "*"
```rust use initials_crate::{AvatarBuilder, AvatarResult};
fn avatar() -> AvatarResult { AvatarBuilder::new("Avatar") .withfontcolor("#000000")? .withbackgroundcolor("#FAFAFA")? .withwidth(200)? .withheight(200) }
fn main() { let avatar = avatar().unwrap(); let image = avatar.draw(); // use the generated image }
```
See Documentation (original docs - still haven't written my own)
MIT
All the credit goes to Onur Sönmez, the original creator of this awesome lib.