colorful-logify
v1.0.0
Published
Add colorful and styled text to your Node.js command-line applications using Minecraft-inspired codes.
Downloads
9
Readme
Colorful Logify
Colorful Logify is a Node.js package that allows you to easily add colorful and formatted text output to your command-line applications. Inspired by the text formatting used in games like Minecraft, Colorful Logify empowers you to create visually appealing and informative console messages.
Features
- Colorful Messages: Enhance your CLI applications with colorful and eye-catching text that captures user attention.
- Text Formatting: Apply various text formats such as bold, italic, underline, and more to emphasize your message.
- Easy Integration: Simply incorporate Colorful Logify into your existing Node.js projects to instantly add text styling.
- Minecraft-Inspired: Colorful Logify uses a similar syntax to Minecraft's text formatting codes for familiarity and ease of use.
Installation
You can install Colorful Logify via npm:
npm install colorful-logify
Usage
To use Colorful Logify in your project, follow these steps:
- Once installed, you can import the package into your Node.js script using the following line:
const { ColorLogger } = require('colorful-logify');
- Create an instance of
ColorLogger
by invoking its constructor:
const logger = new ColorLogger();
- With the instance created, you can now send styled messages to the console using the
.send()
method. To style your messages, you'll use special color and formatting codes, similar to those found in Minecraft's text formatting system.
Example usage (Method 1):
const example1 = new ColorLogger();
example1.send("&4Hello &b&lworld!");
Example usage (Method 2 - StaticStyle):
const StaticStyleLogger = ColorLogger.StaticStyle({
styles: ["&6&n", "&b", "&m", "&5"]
});
const example2 = new StaticStyleLogger();
example2.send("Hello world!");
In both methods, the .send()
method is used to print styled messages to the console. Experiment with different color and format codes to achieve the desired visual effects in your command-line output.
Remember, colorful-logify empowers you to bring a touch of color and styling to your command-line applications, enhancing their readability and engagement.
Color Codes and Formatting
Colorful Logify supports a range of color codes and formatting options. These codes are similar to those used in Minecraft for styling text. Below is a table of color codes and their descriptions:
| Code | Description |
|--------|-----------------------|
| &0
| Black |
| &1
| Dark Blue |
| &2
| Dark Green |
| &3
| Dark Aqua |
| &4
| Dark Red |
| &5
| Dark Purple |
| &6
| Gold |
| &7
| Gray |
| &8
| Dark Gray |
| &9
| Blue |
| &a
| Green |
| &b
| Aqua |
| &c
| Red |
| &d
| Light Purple |
| &e
| Yellow |
| &f
| White |
| &l
| Bold |
| &o
| Italic |
| &n
| Underline |
| &m
| Strikethrough |
| &r
| Reset Format/Color |
Feel free to experiment with different codes and create visually appealing messages for your command-line applications.
Contributing
Contributions are welcome! If you have any ideas for improvements or new features, feel free to reach out to us on Discord. You can contact us at JainaGam3r45 to discuss your ideas or to collaborate. We value your input and appreciate your contributions.