skin-tone
TypeScript icon, indicating that this package has built-in type declarations

4.0.0Β β€’Β PublicΒ β€’Β Published

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.

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i skin-tone

    Weekly Downloads

    774,970

    Version

    4.0.0

    License

    MIT

    Unpacked Size

    6.19 kB

    Total Files

    5

    Last publish

    Collaborators

    • sindresorhus