sindresorhus / Skin Tone
Licence: mit
Change the skin tone of an emoji
Stars: β 42
Programming Languages
javascript
184084 projects - #8 most used programming language
skin-tone
Change the skin tone of an emoji πππ»ππΌππ½ππΎππΏ
The Fitzpatrick scale is used to specify skin tones for emoji characters which represent humans.
Install
$ npm install skin-tone
Usage
const skinTone = require('skin-tone');
skinTone('π', 'brown');
//=> 'ππΎ'
skinTone('π', 'white');
//=> 'ππ»'
// can also remove skin tone
skinTone('ππΎ', 'none');
//=> 'π'
// just passes it through when not supported
skinTone('π¦', 'darkBrown');
//=> 'π¦'
API
skinTone(emoji, tone)
emoji
Type: string
Emoji to modify.
tone
Type: 'none' | 'white' | 'creamWhite' | 'lightBrown' | 'brown' | 'darkBrown'
Skin tone to use for emoji
.
-
'none'
: (Removes skin tone) -
'white'
: π» (Fitzpatrick Type-1β2) -
'creamWhite'
: πΌ (Fitzpatrick Type-3) -
'lightBrown'
: π½ (Fitzpatrick Type-4) -
'brown'
: πΎ (Fitzpatrick Type-5) -
'darkBrown'
: πΏ (Fitzpatrick Type-6)
Skin tone to use for emoji
.
License
MIT Β© Sindre Sorhus
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].