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
import skinTone from '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, type)
emoji
Type: string
Emoji to modify.
type
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
.