Skip to content

Latest commit

 

History

History
32 lines (18 loc) · 1.08 KB

README.md

File metadata and controls

32 lines (18 loc) · 1.08 KB

hexicon

A hexicon is like an identicon, but in the form of a hexagon.

hexicon.js

This javascript library creates the hexicon using an svg. The hashing function used is sdbm, which is what I found used in some identicon libraries. The patterning and color algorithms are my own invention. See: details on how the drawing is made.

Example

Try out some dynamical examples of hexicons in action.

Usage

var el = document.getElementById('svg-element');

var hex = new Hexicon(el, "some text");
hex.updateText("something different");

var hash = hex.getHash();
hex.updateHash('3ddd0999');
hex.updateHash(1037896089);

Similar projects

Another identicon project of mine, Solacon.svg.

For related work, check out Awesome Identicons, a curated list of visual hashes maintained by Husam ABBOUD.