An open API service indexing awesome lists of open source software.

https://github.com/bukinoshita/hash-avatar

:rainbow: Hash avatar algorithm
https://github.com/bukinoshita/hash-avatar

avatar gradient hash javascript nodejs svg

Last synced: 3 months ago
JSON representation

:rainbow: Hash avatar algorithm

Awesome Lists containing this project

README

        

# hash-avatar [![Build Status](https://travis-ci.org/bukinoshita/hash-avatar.svg?branch=master)](https://travis-ci.org/bukinoshita/hash-avatar)

> Hash avatar algorithm

## Install
```
$ npm install --save hash-avatar
```

## Usage
```js
import hashAvatar from 'hash-avatar'

hashAvatar('uid', { size: 100 })
// => It will return a SVG
```

## API
### hashAvatar(uid, { size })

#### uid
Type: `string`

Required

#### size
Type: `number`

Required

## Demo

![](https://media.giphy.com/media/3og0IAXrjGYpBG4SJy/giphy.gif)

## Related

- [react-hash-avatar](https://github.com/bukinoshita/react-hash-avatar) — React hash avatar algorithm

## License

MIT © [Bu Kinoshita](https://bukinoshita.io)