https://github.com/raed667/iconify-hashes-js
Turn hashes into icons
https://github.com/raed667/iconify-hashes-js
Last synced: about 2 months ago
JSON representation
Turn hashes into icons
- Host: GitHub
- URL: https://github.com/raed667/iconify-hashes-js
- Owner: raed667
- License: mit
- Created: 2017-01-07T17:45:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-01-14T12:51:18.000Z (over 8 years ago)
- Last Synced: 2025-02-03T17:05:59.153Z (4 months ago)
- Language: JavaScript
- Homepage: https://raedslab.github.io/iconify-hashes-js/
- Size: 277 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Iconify your hashes
Turn ugly hashes into icons
[](https://travis-ci.org/RaedsLab/iconify-hashes-js)
[](https://david-dm.org/Raedslab/iconify-hashes-js)
[](https://david-dm.org/Raedslab/iconify-hashes-js#info=devDependencies)
[](https://coveralls.io/github/RaedsLab/iconify-hashes-js?branch=master)## Why ?
+ 1 - It is much simpler to compare colorful icons than long hashes.
+ 2- This is mainly used for over the phone transmission of hashes.
## Demo
You can test a working demo here: [https://raedslab.github.io/iconify-hashes-js/](https://raedslab.github.io/iconify-hashes-js/)

## How it works ?
You can use 2 functions:
```js
// returns an array of the colors and icons
iconify.iconify()// returns the HTML of the icons
iconify.getIcons()
```## V 1.0
The version 1.0 works like the following:
+ MD5 the input
+ If a number is found, it gets replaced by an icon from font-awesome.
+ If it is followed by [a-f] it is colored.
+ If an [a-f] is not preceded by an icon, it colors a square.### Proposed spec
I have managed to extract 30 icons from [fontawesome.io](http://fontawesome.io/) using [fontello](http://fontello.com/).
These 30 icons should be simple enough so that they can be transmitted orally in different languages without confusion.

From these 30, 10 has been selected to represent numbers from 0 to 9, like the following.
```
0: 'star'
1: 'cloud'
2: 'eye'
3: 'coffee'
4: 'heart'
5: 'home'
6: 'leaf'
7: 'lock'
8: 'road'
9: 'key'
```
The absence of shape is represented by a square `stop`Colors represent letters from A to F.
```js
a: {
'name': 'pink',
'code': '#ff206d'
},
b: {
'name': 'blue',
'code': '#1a237e'
},
c: {
'name': 'green',
'code': '#4caf50'
},
d: {
'name': 'yellow',
'code': '#ffeb3b'
},
e: {
'name': 'orange',
'code': '#ff9800'
},
f: {
'name': 'red',
'code': '#f40a02'
}
```The absence of color is represented by `black #000000`.