• Stars
    star
    2,550
  • Rank 17,989 (Top 0.4 %)
  • Language
    HTML
  • License
    MIT License
  • Created over 11 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Easy to parse data and spritesheets for emoji

emoji-data - Easy to consume Emoji data and images

NPM version NPM downloads FOSSA Status

This project provides easy-to-parse data about emoji, along with a spritesheet-style images for use on the web.

The current version supports Emoji version 15.0 (Sept 2022)

You can see a catalog of the emoji data here: http://projects.iamcal.com/emoji-data/table.htm

Installation

The git repo is pretty big (almost 4GB), but contains everything. If you want to use npm, you can:

npm install emoji-datasource

This will only install the 32px full-fidelity spritesheets (with fallback images). If you want different size sheets (16, 20 or 64px), quantized sheets (128 or 256 color), non-fallback (clean) sheets, or the individual images (at 64px) then you'll need to install additional npm modules:

npm install emoji-datasource-apple
npm install emoji-datasource-google
npm install emoji-datasource-twitter
npm install emoji-datasource-facebook

You can also use it without downloading via jsDelivr CDN (different sizes here).

Using the data

The file you want is emoji.json. It contains an array of entries for emoji that look like this:

[
    {
        "name": "WHITE UP POINTING INDEX",
        "unified": "261D-FE0F",
        "non_qualified": "261D",
        "docomo": null,
        "au": "E4F6",
        "softbank": "E00F",
        "google": "FEB98",
        "image": "261d.png",
        "sheet_x": 1,
        "sheet_y": 2,
        "short_name": "point_up",
        "short_names": [
            "point_up"
        ],
        "text": null,
        "texts": null,
        "category": "People & Body",
        "subcategory": "hand-single-finger",
        "sort_order": 170,
        "added_in": "1.4",
        "has_img_apple": true,
        "has_img_google": true,
        "has_img_twitter": true,
        "has_img_facebook": false,
        "skin_variations": {
            "1F3FB": {
                "unified": "261D-1F3FB",
                "image": "261d-1f3fb.png",
                "sheet_x": 1,
                "sheet_y": 3,
                "added_in": "6.0",
                "has_img_apple": true,
                "has_img_google": false,
                "has_img_twitter": false,
                "has_img_facebook": false,
            }
            ...
            "1F3FB-1F3FC": {
                ...
            }
        },
        "obsoletes": "ABCD-1234",
        "obsoleted_by": "5678-90EF"
    },
    ...
]

The meaning of each field is as follows:

Fields Description
name The offical Unicode name, in SHOUTY UPPERCASE.
unified The Unicode codepoint, as 4-5 hex digits. Where an emoji needs 2 or more codepoints, they are specified like 1F1EA-1F1F8. For emoji that need to specifiy a variation selector (-FE0F), that is included here.
non_qualified For emoji that also have usage without a variation selector, that version is included here (otherwise is null).
docomo, au,
softbank, google
The legacy Unicode codepoints used by various mobile vendors.
image The name of the image file.
sheet_x, sheet_y The position of the image in the spritesheets.
short_name The commonly-agreed upon short name for the image, as supported in campfire, github etc via the :colon-syntax:
short_names An array of all the known short names.
text An ASCII version of the emoji (e.g. :)), or null where none exists.
texts An array of ASCII emoji that should convert into this emoji. Each ASCII emoji will only appear against a single emoji entry.
category, subcategory Category and sub-category group names.
sort_order Global sorting index for all emoji, based on Unicode CLDR ordering.
added_in Emoji version in which this codepoint/sequence was added (previously Unicode version).
has_img_* A flag for whether the given image set has an image (named by the image prop) available.
skin_variations For emoji with multiple skin tone variations, a list of alternative glyphs, keyed by the skin tone. For emoji that support multiple skin tones within a single emoji, each skin tone is separated by a dash character.
obsoletes, obsoleted_by Emoji that are no longer used, in preference of gendered versions.

Understanding the spritesheets

For each image set (Apple, Google, etc) we generate several different "sprite sheets" - large images of all emoji stitched together.

Every emoji image in the sheet has a 1 pixel transparent border around it, so the 64px sheet is really made up of 66px squares, while the 16px sheet is really made up of 18px squares, etc. You can find the position of any given image on a sheet using the sheet_x and sheet_y properties, as follows:

x = (sheet_x * (sheet_size + 2)) + 1;
y = (sheet_y * (sheet_size + 2)) + 1;

Inside the Git repo you'll find some sheets in the root directory and some in the sheets-indexed-128, sheets-indexed-256 and sheets-clean directories. In the NPM packages, you'll find them under the img/{$set}/sheets* paths. For example:

Git Repo NPM Packages
/sheet_apple_16.png /img/apple/sheets/16.png
/sheets-indexed-128/sheet_apple_16_indexed_128.png /img/apple/sheets-128/16.png
/sheets-clean/sheet_apple_16_clean.png /img/apple/sheets-clean/16.png

In these examples, the image set is from Apple and the images are 16px on a side. The sheets on the top row are 24 bit color, while the sheets in the middle row use an indexed color palette with only 128 colors. This makes the image much smaller, but sacrifices a lot of quality. Both 128 color and 256 color sheets are provided. The sheets on the bottom row do not contain fallbacks for missing images, so the Google sheet only contains Google images (and no Apple fallbacks). This means that some images are replaced with the fallback character (a question mark), but the usage rights are simpler.

Version history

See CHANGES.md

Image Sources

Images are extracted from their sources and this library attempts to track the latest available versions. If you're looking for older versions of Apple or Android images (such as the Hairy Heart) then you'll need to look at previous revisions.

Image Set Source Version Supported Emoji Missing Images
Apple macOS Ventura 13.3.1 Emoji 15.0 3
Google Noto Emoji, v2.038 Emoji 15.0 0
Twitter Twemoji, v14.0.0 Emoji 14.0 31
Facebook v9, fetched 2023-04-17 Emoji 14.0 55
  • Apple images, Copyright © Apple Inc., are not licensed for commercial usage.
  • Android/Google/Noto images, are available under the Apache License 2.0.
  • Twitter images are available under the Creative Commons Attribution 4.0 license.
  • Facebook images, © Facebook, Inc., have no clear licensing.

If you use the spritesheet images and are concerned about usage rights, please use the 'clean' versions, which avoid using fallback images for missing emoji (see the spritesheet section above for more details).

Libraries which use this data

More Repositories

1

js-emoji

A JS Emoji conversion library
JavaScript
1,417
star
2

oembed

The oEmbed Spec
PHP
1,314
star
3

php-emoji

A PHP Emoji conversion library
PHP
1,255
star
4

enchant-order

Minecraft enchantment optimization tool
JavaScript
261
star
5

Flickr-StatsD

Mirror of code.flickr.com: Flickr-StatsD
Perl
110
star
6

PNGStore

Store JS/CSS in compressed PNGs
JavaScript
94
star
7

rfc822

PHP email address validator based on RFCs 822, 2822, 5322 & more
PHP
82
star
8

World-of-MapCraft

World of Warcraft Slippy Maps
PHP
79
star
9

service.js

Make init.d scripts for node apps
JavaScript
69
star
10

lib_autolink

PHP HTML link formatting library
PHP
60
star
11

SQLParser

Parse MySQL schemas in PHP, fast
PHP
58
star
12

brainfuck-debug

Javascript Brainfuck Interpreter / Debugger
HTML
54
star
13

lego-carcassonne

Lego Carcassonne
22
star
14

lib_sanitize

PHP input filtering library
PHP
20
star
15

lib_oauth

Very simple PHP4 OAuth library
PHP
18
star
16

rollup

Aggregate & graph high-volume sample data in real time
JavaScript
18
star
17

glitch-oauth-demos

Glitch API OAuth examples
PHP
18
star
18

logTailer

Tail logs over HTTP, using node
JavaScript
15
star
19

lib_bcrypt

Shut up and use bcrypt
PHP
14
star
20

lib_filter

PHP HTML filtering library
PHP
13
star
21

unicodey.com

Unicode tools
PHP
13
star
22

choose

Choose your own adventure, in PHP
PHP
13
star
23

iTunesRemote

iTunesRemote is a simple web interface that allows you to control iTunes over the web.
PHP
11
star
24

uploadr

Mirror of code.flickr.com: uploadr
ActionScript
10
star
25

grant-pattishall-award.com

The website
Hack
10
star
26

lib_timezones

Sensible Timezone Selection
PHP
10
star
27

logSmush

Aggregate logs from multiple servers in real time
JavaScript
9
star
28

iTunesServer

A iTunes-like web interface for remote music collections
PHP
9
star
29

WordPress-SSO

Single Sign-On for WordPress
PHP
7
star
30

slack-if

Play Interactive Fiction on Slack
JavaScript
7
star
31

perl-Flickr-API

Perl interface to the Flickr API
Perl
7
star
32

wow-NewAddon

A template for creating Lua-only addons for World of Warcraft.
Lua
7
star
33

MediaWiki-SSO

SSO for MediaWiki
PHP
7
star
34

g2

Ganglia interface tools
PHP
6
star
35

flengbot

Group messaging Jabber bot
Perl
6
star
36

homespring.js

A JavaScript interpreter for Homespring
JavaScript
6
star
37

autolink-js

JS link formatting library
JavaScript
6
star
38

bad-toys

Capture client-side Javascript errors in the wild
PHP
6
star
39

SchemaDiff

Database schema diffing tool
PHP
6
star
40

flamework-JSON

Decode bad 'JSON' in PHP
PHP
5
star
41

Wowhead-API

PHP library for turning Wowhead pages into useful data
PHP
5
star
42

perl-CSS

CSS.pm
Perl
5
star
43

php-snippets

Small/misc pieces of PHP
Groff
5
star
44

Choropleths

Tools for generating choropleth maps
Perl
4
star
45

gmaps-custom

Use a custom tile-set with Google Maps
JavaScript
4
star
46

shakefeed.com

The ShakeFeed webapp
PHP
4
star
47

gmaps-labels

Label overlays for Google Maps
JavaScript
4
star
48

mc-pixels

PHP
4
star
49

desktopr

Mirror of code.flickr.com: desktopr
JavaScript
4
star
50

clustr

Mirror of code.flickr.com: clustr
C++
4
star
51

lib_solr_query

Turn human queries into SOLR queries
PHP
3
star
52

Flickr-FTPD

An experimental upload-via-FTP interface for Flickr
Java
3
star
53

londonbloggers

A revamp of the london bloggers directory
PHP
3
star
54

perl-Algorithm-PCA

Principal component analysis
Perl
3
star
55

Flickr-Test

Mirror of code.flickr.com: Flickr-Test
Perl
3
star
56

Trac-SSO

Python
3
star
57

wow-MillHouse

WoW addon for summarizing herbs ready to mill
Lua
3
star
58

Phabricator-SSO

Single Sign-On for Phabricator
PHP
3
star
59

wow-Precedence

WoW addon that creates a dashboard for raiding hunters
Lua
3
star
60

wow-BunnyHunter

World of Warcraft addon for tracking rare pet farming.
Lua
3
star
61

lib_classify

PHP Language bayesian classifier
PHP
2
star
62

sycamore-server

A game (engine)
JavaScript
2
star
63

InsanityTracker

A web app to track players who gain the achievement Insane in the Membrane in World of Warcraft
PHP
2
star
64

wow-Non-Compos-Mentis

World of Warcraft addon for tracking the [Insane in the Membrane] achievement.
Lua
2
star
65

perl-XML-Parser-Lite-Tree-XPath

XML::Parser::Lite::Tree::XPath - Pure Perl XPath implementation
Perl
2
star
66

ease.js

Easing functions for natural animation, in JavaScript.
JavaScript
2
star
67

updog.report

what's updog?
PHP
2
star
68

thisismyj.am

Web app for tracking your Jams
PHP
2
star
69

wow-Auc-Searcher-Insane

World of Warcraft Auctioneer plugin for search for Darkmoon Faire rep items.
Lua
2
star
70

perl-Parse-EBNF

Parse::EBNF from CPAN
Perl
2
star
71

http_utils.js

HTTP utils for node.js
JavaScript
2
star
72

flamework-useragent

A Flamework library for decoding User Agent strings
PHP
2
star
73

perl-Acme-Goatse

On-demand goatse
Perl
2
star
74

wow-BuffGuide

Show missing raid buffs
Lua
2
star
75

XML_NiceTree

PHP4 xpath-like library
PHP
2
star
76

wow-TreasureHunt

WoW addon to track treasure items
Lua
2
star
77

lib_xml

Mirror of code.flickr.com: lib_xml
PHP
1
star
78

flickrPearAPI

Flickr API PHP PEAR module
PHP
1
star
79

perl-Language-Nouse

Perl interpreter for the nouse language
Perl
1
star
80

hCardFight

Microformats collectible card game
PHP
1
star
81

perl-Acme-Python

For *real* python programs
Perl
1
star
82

wow-MoveSCT

WoW addon to move the default scrolling combat text
Lua
1
star
83

lib_ap

Admin Protocol Library
PHP
1
star
84

mysql-rest-monitor-php

1
star
85

ImageMagickTips

How to actually do common things in IM
1
star
86

the5k.org

PHP
1
star
87

little-glitch

A little-printer Glitch app
PHP
1
star
88

perl-Image-Caa

Colored ASCII Art library
Perl
1
star
89

XML_Atom

PHP Atom parser, compatible with PEAR's XML::RSS
PHP
1
star
90

perl-Inline-Interp

Make Inline modules for interpreted languages, easily
Perl
1
star
91

mittens

Modular blogging platform in Django (unfinished)
JavaScript
1
star
92

perl-Flickr-misc

Misc Flickr perl utils
Perl
1
star
93

CalAmp

Record your track history from WinAmp2
C
1
star
94

pquery

jQuery style DOM traversal, in PHP
PHP
1
star
95

bingo.iamcal.com

HTML
1
star
96

perl-Language-Homespring-Visualise-GraphViz

CPAN Language::Homespring::Visualise::GraphViz
Perl
1
star
97

flickr-shell

Perl
1
star
98

perl-Inline-SMITH

Inline.pm module to let you write Perl subs in SMITH
Perl
1
star
99

GuildInfo

WoW Guild site
PHP
1
star
100

phpBB-Patches

Misc patches for phpBB
1
star