Skip to content

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

License

Notifications You must be signed in to change notification settings

Qit-tools/skin-tone

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published