All Projects β†’ sindresorhus β†’ Skin Tone

sindresorhus / Skin Tone

Licence: mit
Change the skin tone of an emoji

Programming Languages

javascript
184084 projects - #8 most used programming language

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

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].