Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

colorette

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

colorette

Easily set your terminal text color & styles.

  • 2.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
34M
increased by1.08%
Maintainers
1
Weekly downloads
 
Created

What is colorette?

The colorette npm package is a Node.js library for colorizing text in the terminal. It provides a simple API to add colors and styles to console output, which can be useful for creating more readable and organized logs, command-line tools, and scripts.

What are colorette's main functionalities?

Text coloring

Colorette allows you to color text output in the terminal. You can use predefined color functions to wrap your text and make it appear in the specified color when logged to the console.

const { red, green, blue } = require('colorette');
console.log(red('This is red text'));
console.log(green('This is green text'));
console.log(blue('This is blue text'));

Text styling

In addition to coloring, colorette provides functions to apply various text styles such as bold, underline, and italic.

const { bold, underline, italic } = require('colorette');
console.log(bold('This is bold text'));
console.log(underline('This is underlined text'));
console.log(italic('This is italic text'));

Combining styles

Colorette allows you to combine multiple styles and colors for a single piece of text. This can be useful for highlighting important information or creating visually distinct messages in the terminal.

const { red, bold, bgGreen } = require('colorette');
console.log(bold(red(bgGreen('Red text on green background'))));

Other packages similar to colorette

Keywords

FAQs

Package last updated on 18 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc