const chalk = require('chalk'); console.log(chalk.yellow('Warning!')); // outputs text with yellow color console.log(`${chalk.yellow('Warning:')} This action is irreversible.`); // outputs text with yellow color and prefix console.log(chalk.bgYellow.black('Success!')); // outputs text with yellow background and black color console.log(chalk.yellow.bold('Warning!')); // outputs text with yellow color and bold styleIn the above examples, the `chalk.yellow()` method is used to set the text color to yellow. The `chalk.bgYellow()` method is used to set the background color to yellow. The `chalk.bold()` method is used to set the text to bold. All of these methods are part of the Chalk library, which is a popular package for styling console output in Node.js.