1.6.0 • Published 8 months ago

nstypocolors v1.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

nstypocolors

npm version Downloads Discord GitHub contributors semantic-release: angular CodeQL Dependency Review Last Commit

nstypocolors is a TypeScript package that provides colorful console logs for TypeScript developers. It allows you to log messages with different colors in the console, making it easier to debug and understand your logs.

Features

  • Log messages with different colors such as red, green, yellow, blue, magenta, cyan, and white.
  • Designed specifically for TypeScript, ensuring strong type safety and compatibility.

Installation

You can install nstypocolors via npm:

npm install nstypocolors

Usage

To start using nstypocolors, import the desired functions into your TypeScript project

import {
  logRed,
  logGreen,
  logPink,
  logYellow,
  logBlue,
  logMagenta,
  logCyan,
  logWhite,
  logBlack,
} from 'nstypocolors'

Now you can use the provided functions to log colorful messages:

logRed('This is a red message')
logGreen('This is a green message')
logPink('This is a pink message')
logYellow('This is a yellow message')
logBlue('This is a blue message')
logMagenta('This is a magenta message')
logCyan('This is a cyan message')
logWhite('This is a white message')
logBlack('This is a black message')

Similarly, you can use bright and pastel colors

import { logBrightRed, logPastelGreen } from 'nstypocolors'

// Log message in bright colors
logBrightRed('This is a bright red message!')

// Log message in pastel colors
logPastelGreen('This is a pastel green message!')

!TIP Consider importing only the necessary colors to streamline your code and reduce unnecessary clutter. By importing only the colors you need, you can enhance readability and maintainability, ensuring that your code remains clean and efficient.

Our Colors

Welcome to the vibrant world of nstypocolors, where your console logging can be as colorful as your imagination! This package offers a wide array of colors, ensuring that your logs are not just informative but also visually stunning. Dive into our palette and make your console logs stand out.

Standard Colors

Enhance your console output with our classic colors:

  • Red: Logs a message in a bold red.
  • Green: Logs a message in a refreshing green.
  • Pink: Logs a message in a charming pink.
  • Yellow: Logs a message in a bright yellow.
  • Blue: Logs a message in a cool blue.
  • Magenta: Logs a message in a vibrant magenta.
  • Cyan: Logs a message in a soothing cyan.
  • White: Logs a message in a crisp white.
  • Black: Logs a message in a sleek black.

Bright Colors

Make your messages pop with our bright color collection:

  • Bright Red: Logs a message in an eye-catching bright red.
  • Bright Green: Logs a message in a vivid bright green.
  • Bright Pink: Logs a message in an energetic bright pink.
  • Bright Yellow: Logs a message in a dazzling bright yellow.
  • Bright Blue: Logs a message in a striking bright blue.
  • Bright Magenta: Logs a message in an electrifying bright magenta.
  • Bright Cyan: Logs a message in a vibrant bright cyan.
  • Bright White: Logs a message in a radiant bright white.

Pastel Colors

Add a soft touch to your messages with our pastel colors:

  • Pastel Red: Logs a message in a gentle pastel red.
  • Pastel Green: Logs a message in a calming pastel green.
  • Pastel Yellow: Logs a message in a mellow pastel yellow.
  • Pastel Blue: Logs a message in a serene pastel blue.
  • Pastel Magenta: Logs a message in a soothing pastel magenta.
  • Pastel Cyan: Logs a message in a cool pastel cyan.
  • Pastel White: Logs a message in a soft pastel white.
  • Pastel Pink: Logs a message in a sweet pastel pink.
  • Pastel Lavender: Logs a message in a dreamy pastel lavender.
  • Pastel Coral: Logs a message in a warm pastel coral.
  • Pastel Mint: Logs a message in a fresh pastel mint.

Background Colors

Add colorful backgrounds to your console logs:

  • Back Pastel Red: Logs a message with a pastel red background.
  • Back Pastel Pink: Logs a message with a pastel pink background.
  • Back Pastel Blue: Logs a message with a pastel blue background.
  • Back Pastel Green: Logs a message with a pastel green background.
  • Back Pastel Yellow: Logs a message with a pastel yellow background.
  • Back Pastel Orange: Logs a message with a pastel orange background.
  • Back Pastel Lavender: Logs a message with a pastel lavender background.
  • Back Pastel Coral: Logs a message with a pastel coral background.
  • Back Pastel Mint: Logs a message with a pastel mint background.

You can use the provided functions to log messages in these colors, adding a vibrant and visually appealing touch to your console output.

Special Colors

Rainbow Gradient

The logGradient function creates a smooth gradient that cycles through the colors of the rainbow, also known as VIBGYOR (Violet, Indigo, Blue, Green, Yellow, Orange, Red). This function is great for logging colorful messages in a playful and visually appealing way. It adds a vibrant touch to your console output.

logGradient('This is a rainbow gradient message!')

This function provides a delightful effect as it cycles through colors, with each character in the message displayed in a different color of the rainbow. It’s perfect for highlighting fun or attention-grabbing messages.

Success

The logSuccess function creates a smooth gradient transitioning from blue shades to magenta, followed by a transition into pink. This gradient was inspired by the success messages seen in the Turbo repository, providing a modern and visually delightful color blend. It’s perfect for logging important success messages in a way that stands out and attracts attention.

logSuccess('This message has a pink, magenta, and blue gradient!')

This gradient provides a visually pleasing and smooth transition between colors, making success messages not only easy to spot but also more engaging.

Support

If you need assistance with understanding the documentation, encounter any issues, or simply require guidance, please join our Discord server. Our community and support team are here to help you!

Thank You

I hope this package will help you, happy coding.

Contributors

nsgpriyanshu

1.5.2

8 months ago

1.6.0

8 months ago

1.5.1

8 months ago

1.4.2

8 months ago

1.5.0

8 months ago

1.4.1

8 months ago

1.4.0

8 months ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.14

1 year ago

1.2.12

1 year ago

1.2.13

1 year ago

1.2.9

1 year ago

1.2.8

1 year ago

1.2.10

1 year ago

1.2.11

1 year ago

1.2.6

1 year ago

1.2.5

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago