Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yohangdev/letter-avatar
Generate user avatar using name initials letter.
https://github.com/yohangdev/letter-avatar
Last synced: about 1 month ago
JSON representation
Generate user avatar using name initials letter.
- Host: GitHub
- URL: https://github.com/yohangdev/letter-avatar
- Owner: yohangdev
- Created: 2016-01-08T06:10:28.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-01-28T03:27:25.000Z (11 months ago)
- Last Synced: 2024-05-23T10:21:27.408Z (7 months ago)
- Language: PHP
- Homepage:
- Size: 589 KB
- Stars: 123
- Watchers: 5
- Forks: 51
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-indo-projects - Letter Avatar for PHP - Generate avatar berdasarkan inisial nama. (PHP)
README
# Letter Avatar for PHP
Generate user avatar using name initials letter.
![letter-avatar](https://cloud.githubusercontent.com/assets/618412/12192012/835c7488-b60d-11e5-9276-d06f42d11a86.png)
## Features
* Data URI image ready (also save as PNG/JPG).
* Consistent color.
* Customize size, shape: square, circle.
* Small, fast.## Install
Via Composer
``` bash
$ composer require yohang88/letter-avatar
```### Implementation
``` php
saveAs('path/to/filename');
$avatar->saveAs('path/to/filename', LetterAvatar::MIME_TYPE_JPEG);```
``` html
```To use static colour or custom colour use `->setColor($background, $foreground);`
``` html
```