rockicon
A fork of jazzicon with support of changing colors palette
Last updated 2 years ago by barrakuda .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install rockicon 
SYNC missed versions from official npm registry.

Rockicon

Rocky Identicons

It is a fork of (jazzicon)[https://github.com/danfinlay/jazzicon] with ability to set colors palette from outside.

Installation

npm install rockicon -S

Usage

Takes a color palette, a pixel diameter and a javascript integer (seeds the shape), and gives you back a DOM element to use as you wish!

var colors = [
	'#5bdd95',
  '#5bddcf',
  '#47b1ee',
  '#3677ee',
  '#7e27d0',
  '#631fa3',
  '#d025ce',
  '#f12498',
  '#f1611a',
  '#f8c013',
]
var rockicon = require('rockicon')
rockicon.setColorsPalette(colors)
var body = document.querySelector('body')
for(var i = 0; i < 60; i++) {
  var el = rockicon.generateIdenticon(100, Math.round(Math.random() * 10000000))
  body.appendChild(el)
}

Example

You can run an example by installing beefy (npm i -g beefy) and then running npm start.

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 1
Dependencies (2)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |