Node.js Chalk Module Last Updated : 07 Oct, 2021 Comments Improve Suggest changes Like Article Like Report Chalk module in Node.js is the third-party module that is used for styling the format of text and allows us to create our own themes in the node.js project. Advantages of Chalk Module: It helps to customize the color of the output of the command-line outputIt helps to improve the quality of the output by providing several color options like for warning message red color and many more Chalk Module: https://www.npmjs.com/package/chalk Installing Module: npm install chalk Project Structure: Example 1: index.js // Importing module const chalk=require("chalk"); // Printing the text console.log(chalk.red("aayush")) console.log(chalk.red.underline("aayush")) console.log(chalk.red.underline.bold("GFG")) Run index.js file using below command: node index.js Output: This will be the console output. Example 2: Defining own themes. index.js // Importing chalk module const chalk=require("chalk"); // Creating theme const warning=chalk.red; // Printing theme text console.log(warning("Restricted Zone")); const welcome=chalk.green console.log(welcome("GFG")) Run index.js file using below command: node index.js Output: This will be the console output. Comment More infoAdvertise with us Next Article Node.js Chalk Module Z zack_aayush Follow Improve Article Tags : Technical Scripter Web Technologies Node.js Technical Scripter 2020 Similar Reads Node.js VM Module The VM (Virtual Machine) module in Node.js lets you safely run JavaScript code in a separate, isolated environment. This feature is especially handy when you need to execute code without affecting the rest of your application, making it ideal for handling untrusted code or creating distinct executio 4 min read Node.js Local Module A local module in Node.js refers to a custom module created in an application. Unlike the built in or third-party modules, local modules are specific to the project and are used to organize and reuse your code across different parts of your application.Local Module in Node.jsLocal modules in Node.js 2 min read What are Modules in Node.js ? In Node.js Application, a Module can be considered as a block of code that provide a simple or complex functionality that can communicate with external application. Modules can be organized in a single file or a collection of multiple files/folders. Almost all programmers prefer modules because of t 5 min read What are modules in Node JS ? In NodeJS, modules are encapsulated units of code that can be reused across different parts of an application. Modules help organize code into smaller, manageable pieces, promote code reusability, and facilitate better maintainability and scalability of NodeJS applications. Types of Modules:Core Mod 2 min read Node.js Utility Module The util module in Node.js provides a variety of utility functions that assist with tasks such as debugging, formatting, and inheritance. It includes methods for inspecting objects, formatting strings, and extending classes. Node.js Utility ModuleThe util module offers essential utilities that are n 4 min read Like