1.0.1 • Published 8 years ago

minecraft-colors v1.0.1

Weekly downloads
3
License
MIT
Repository
-
Last release
8 years ago

minecraft-colors

Translate Minecraft color codes to ASCII

Usage

Example:

const mccolors = require('minecraft-colors'),
      chatMsg = "§a§lWelcome to our server!";

/* Translates Minecraft colors to ASCII colors */
console.log(mccolors.translateColors(chatMsg));

/* Strips colors */
console.log(mccolors.stripColors(chatMsg));

Todo

  • Translate ASCII codes back to Minecraft codes
  • Translate words to Minecraft color codes ('red' -> '§4' etc.)