mirror of
https://github.com/Snigdha-OS/documentation.git
synced 2025-12-06 04:43:52 +01:00
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