❀Newfangled Package Modernizer

npm

Join us for the upcoming webinar, "Enterprise JavaScript done right: the tools you love, the security you need."Sign up here Β»

skin-tone

2.0.0Β β€’Β PublicΒ β€’Β Published

skin-tone Build Status

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

install

npm i skin-tone

Downloadsweekly downloads

102

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability