Skip to content

sentaca/randicon

Repository files navigation

Randicon

Randicon generates gravatar-like, slack-like icons based on the string hashcode.

Usage

Use bower:

bower install randicon

or include dist/randicon.min.js into your document:

  <!-- (1) Include randicon.min.js -->
  <script src="dist/randicon.min.js"></script>

  <svg id="icon1" width="64" height="64"/>

  <script>
    // (2) Call randicon(id, string)
    randicon("#icon1", "[email protected]");
  </script>

Please note that randicon.min.js includes snap.svg.min.js.

Example

Example Output

Development

npm install
bower install
gulp

License

MIT

Credits

Shoutout to @Snapsvg guys.

About

Generate SVG icon based on string hash code.

Resources

License

Stars

Watchers

Forks

Packages

No packages published