Giter Site home page Giter Site logo

clydedz / robohash-avatars-npm Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 1.0 228 KB

Generate robot-based avatar images for any text.

Home Page: http://bit.ly/robohash-avatars

License: MIT License

JavaScript 72.56% TypeScript 27.44%
npm npm-package robohash robohash-avatar avatar avatars avatar-generator profile-picture user picture

robohash-avatars-npm's Introduction

Robohash Avatars

Generate robot-based avatar images based on any text.

Build status Azure DevOps tests (branch) Azure DevOps coverage Quality Gate Status Maintainability Rating MIT License npm

Usage

After installing, simply import Robohash Avatars in your file.

const robohashAvatars = require("robohash-avatars");

Consume the generateAvatar() API to get an avatar URL that you can use directly as an image. Supply the settings object to this method to generate the avatar image URL accordingly. Username is required. For the remainder, you can supply them based on your requirement. All settings are pretty self-explanatory.

var avatarURL = robohashAvatars.generateAvatar({   
            username: "tonystark", 
            background: robohashAvatars.BackgroundSets.RandomBackground1,
            characters: robohashAvatars.CharacterSets.Kittens,
            height: 400,
            width: 400
        }); 

Options

CharacterSets supports Robots, Monsters, DisembodiedHeads and Kittens. BackgroundSets supports RandomBackground1 and RandomBackground2

Examples

Clicking on the images below opens the image in a browser window.

Sample image 1 Sample image 2 Sample image 3

Release notes

Release notes can be found here.

Credits

RoboHash.org is developed by Colin Davis / RoboHash GitHub.
This npm package is developed by Clyde D'Souza.

robohash-avatars-npm's People

Contributors

baderj avatar clydedz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

baderj

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.