Change the skin tone of an emoji πππ»ππΌππ½ππΎππΏ
The Fitzpatrick scale is used to specify skin tones for emoji characters which represent humans.
$ npm install skin-tone
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');
//=> 'π¦'
Type: string
Emoji to modify.
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
.
MIT Β© Sindre Sorhus