npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

colorific-magic

v1.0.2

Published

Colorific is a lightweight and easy-to-use Node.js library that adds beautiful, customizable colors to your console logs. Whether you're debugging or just want to make your terminal outputs pop, Colorific gives you full control over color schemes and styl

Downloads

195

Readme

🌈 Colorific Magic - Add Color to Your Console Logs!

Description

Colorific Magic is a lightweight and customizable Node.js library that adds beautiful, customizable colors and styles to your console logs. Whether you're debugging or just want to make your terminal outputs pop, Colorific gives you full control over color schemes and styles to brighten up your development workflow.

Features

🎨 Color-Coded Logs: Different styles for success, danger, info, and more. 🌟 Custom Styles: Customize text color, background, borders, shadows, and more. 💡 Simple API: Easy-to-use static methods for different log types. 🚀 Lightweight and Fast: Minimal footprint, easy integration.

Table of contents

Installation

To install the Colorific Magic library, use npm:

npm install colorific-magic

Or, if you prefer yarn:

yarn add colorific-magic

Usage

Import the log class from the colorific-magic package and start using its methods to style your console logs.

const { log } = require('colorific-magic');

Success Messages

log.success('Operation was successful!');
log.successLight('Light green success message');
log.successBg('Success message with green background');
  • success(msg: string): Logs a success message in green with bold font.
  • successLight(msg: string): Logs a success message in light green with bold font.
  • successBg(msg: string): Logs a success message with a green background and white text.

Danger/Error Messages

log.danger('An error occurred!');
log.dangerBg('Error message with red background');
log.dangerOutline('Error message with red outline');
  • danger(msg: string): Logs an error message in red with bold font.
  • dangerBg(msg: string): Logs an error message with a red background and white text.
  • dangerOutline(msg: string): Logs an error message with a red border.

Info Messages

log.info('This is an informational message.');
log.infoLight('Yellow info message on black background');
log.infoBlue('Informational message in blue');
  • info(msg: string): Logs an informational message with black text on a yellow background.
  • infoLight(msg: string): Logs an informational message with yellow text on a black background.
  • infoBlue(msg: string): Logs an informational message in blue with bold font.

Warning Messages

log.warning('This is a warning!');
log.warningBg('Warning message with orange background');
log.warningOutline('Warning message with orange outline');
  • warning(msg: string): Logs a warning message in orange with bold font.
  • warningBg(msg: string): Logs a warning message with an orange background and white text.
  • warningOutline(msg: string): Logs a warning message with an orange border.

Debugging Messages

log.debug('Debugging message in blueviolet');
log.debugBg('Debugging message with blueviolet background');
log.debugShadow('Debugging message with shadow');
  • debug(msg: string): Logs a debugging message in blueviolet with bold font.
  • debugBg(msg: string): Logs a debugging message with a blueviolet background and white text.
  • debugShadow(msg: string): Logs a debugging message with a shadow effect.

Success with Borders

log.successWithBorder('Success message with border');
log.successBgWithBorder('Success message with green background and border');
  • successWithBorder(msg: string): Logs a success message with a green border.
  • successBgWithBorder(msg: string): Logs a success message with a green background and a dark green border.

Neutral Messages

log.neutral('This is a neutral message.');
log.neutralBg('Neutral message with gray background');
log.neutralShadow('Neutral message with shadow');
  • neutral(msg: string): Logs a neutral message in gray.
  • neutralBg(msg: string): Logs a neutral message with a gray background and white text.
  • neutralShadow(msg: string): Logs a neutral message with a shadow effect.

Custom Styles

log.custom('Custom styled message', 'pink', 'black');
log.bold('This is a bold message');
log.italic('This is an italic message');
log.underline('This is an underlined message');
log.strikethrough('This is a strikethrough message');
  • custom(msg: string, color: string, bgColor: string): Logs a message with custom text and background colors.
  • bold(msg: string): Logs a bold message in black.
  • italic(msg: string): Logs an italic message in blue.
  • underline(msg: string): Logs an underlined message in purple with bold font.
  • strikethrough(msg: string): Logs a message with a strikethrough effect in red with bold font.

Gradient Text (WebKit-based browsers)

log.gradientText('This text has a gradient color!');
  • gradientText(msg: string): Logs a message with a gradient text color effect.

Shadowed Text

log.shadowText('This text has a shadow effect.');
  • shadowText(msg: string): Logs a message with a shadow effect.

Rainbow Text

log.rainbowText('Rainbow-colored text');
  • rainbowText(msg: string): Logs a message with rainbow-colored text.

Background Variations

log.darkBg('Text on a dark background');
log.lightBg('Text on a light background');
log.blueBg('Text with a blue background');
  • darkBg(msg: string): Logs a message with white text on a black background.
  • lightBg(msg: string): Logs a message with black text on a white background.
  • blueBg(msg: string): Logs a message with white text on a blue background.

Fancy Styles

log.fancyShadow('Fancy message with shadow');
log.fancyBorder('Fancy message with dashed border');
log.fancyBgWithShadow('Fancy message with dark background and shadow');
  • fancyShadow(msg: string): Logs a message with magenta text and shadow effect.
  • fancyBorder(msg: string): Logs a message with a purple dashed border.
  • fancyBgWithShadow(msg: string): Logs a message with a dark blue background and shadow effect.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

We welcome contributions to the Colorific Magic library! Feel free to submit pull requests or open issues for improvements, bug fixes, or feature requests.

For detailed guidelines on contributing, please refer to the CONTRIBUTING file.