# skin-tone

> Change the skin tone of an emoji 👌👌🏻👌🏼👌🏽👌🏾👌🏿

Latest version **4.0.0** (published 2024-01-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install skin-tone
pnpm add skin-tone
yarn add skin-tone
bun add skin-tone
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2024-01-07 |
| First published | 2016-06-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=18 |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 64 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | emoji, emojis, skin, tone, type, unicode, emoticon, fitzpatrick, scale, modify, change, strip, remove |

## Links

- npm: https://www.npmjs.com/package/skin-tone
- Repository: https://github.com/sindresorhus/skin-tone
- Homepage: https://github.com/sindresorhus/skin-tone#readme
- Issues: https://github.com/sindresorhus/skin-tone/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/skin-tone

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2024-01-07
- 3.0.0 — 2021-04-14
- 2.0.0 — 2019-04-28
- 1.0.0 — 2017-01-13
- 0.2.0 — 2016-07-04
- 0.1.1 — 2016-06-28
- 0.1.0 — 2016-06-27

## README

# skin-tone

> Change the skin tone of an emoji 👌👌🏻👌🏼👌🏽👌🏾👌🏿

The [Fitzpatrick scale](https://en.wikipedia.org/wiki/Fitzpatrick_scale#Unicode) is used to specify skin tones for emoji characters which represent humans.

## Install

```sh
npm install skin-tone
```

## Usage

```js
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`.

---
_Source: https://npm.io/package/skin-tone · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
