@qit.tools/skin-tone
TypeScript icon, indicating that this package has built-in type declarations

0.6.2Β β€’Β PublicΒ β€’Β Published

Skin Tone

Test status

Change emoji skin tones effortlessly. πŸ§›πŸ§›πŸ»πŸ§›πŸΌπŸ§›πŸ½πŸ§›πŸΎπŸ§›πŸΏ

πŸ‘€ DEMO

CDN

πŸ—οΈ Install

πŸŽ‰ NPM

npm i @qit.tools/skin-tone

🧁 Bun

bun add @qit.tools/skin-tone

🌟 PNPM

pnpm add @qit.tools/skin-tone

🧢 Yarn

yarn add @qit.tools/skin-tone

πŸŽ“ How to use

NodeJS

// Import by default
import skinTone from "@qit.tools/skin-tone";

console.log(skinTone("🧁", "dark")); // 🧁
console.log(skinTone("πŸ§‘πŸΏβ€πŸ€β€πŸ§‘πŸΏ", "light")); // πŸ§‘πŸ»β€πŸ€β€πŸ§‘πŸ»

Browser

// https://unpkg.com/@qit.tools/skin-tone@0.6.2/dist/browser/latest.min.js

document.addEventListener("DOMContentLoaded", () => {
    console.log(skinTone("πŸ§‘πŸ»β€πŸ€β€πŸ§‘πŸ»", "dark"));
});

API

skinTone(emoji, tone)

emoji

Type: string

tone

type SkinTone = '' | 'none' | 'light' | 'mediumLight' | 'medium' | 'mediumDark' | 'dark'

Type: SkinTone | undefined

Skin tone to use for emoji.

  • none None skin tone
  • light light skin tone, fitzpatrick type-1–2
  • mediumLight medium-light skin tone, fitzpatrick type-3
  • medium medium skin tone, fitzpatrick type-4
  • mediumDark medium-dark skin tone, fitzpatrick type-5
  • dark dark skin tone, fitzpatrick type-6

License

MIT

Unicode License Agreement

https://www.unicode.org/license.html

Package Sidebar

Install

npm i @qit.tools/skin-tone

Weekly Downloads

6

Version

0.6.2

License

MIT

Unpacked Size

9.37 kB

Total Files

7

Last publish

Collaborators

  • yydarwin