linecolor
v1.0.10
Published
Colored text in console using Linecolor
Maintainers
Readme
linecolor
linecolor is a lightweight Node.js package for printing colored text in the console.
It supports multiple color formats: RGB, HEX, HSL, and Named Colors.
The package also provides convenient log functions for common message types like errors, warnings, and info, making your console output more readable and visually appealing.
Features
TextRGB(text, r, g, b)
Returns a string colored with the specified RGB values. Can be used anywhereconsole.log()accepts a string.TextHEX(text, hex)
Returns a string colored using a HEX color code (#RRGGBB). Supports both#prefixed or plain hex.TextHSL(text, h, s, l)
Returns a string colored using HSL (Hue, Saturation, Lightness). Hue: 0–360, Saturation/Lightness: 0–100%.TextColorName(text, name)
Returns a string colored using a Named CSS color. Supports standard colors likered,green,skyblue,yellow,orange, etc.TextUnderline(text) Underlines the text.
TextBG_RGB(text, r , g , b) Make background color with text ( RGB )
TextBG_HSL(text, h , s, l) Make background color with text ( HSL )
TextBG_HEX(text, h , e, x) Make background color with text ( HEX )
Installation
Install via npm:
npm install linecolor