Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
ansi-256-colors
Advanced tools
256 ansi color codes for styling terminal output
You probably want the higher-level chalk module for styling your strings.
$ npm install --save ansi-256-colors
var colors = require('ansi-256-colors');
console.log(colors.fg.getRgb(2,3,4) + colors.bg.getRgb(4,4,4) + 'Hello world!' + colors.reset);
The module exposes a fg
and bg
object, and a reset
code. Both the foreground and background objects contain:
Returns the color code for the given red-green-blue value.
All 256 color codes.
The 8 base color codes, guaranteed to work on every system.
The 8 base bright/bold color codes, guaranteed to work on every system.
The 24 grayscales ranging from white to black.
The 216 varying color tints, where the order corresponds to the code-point 36*r
+ 6*g
+ b
.
Closes any previously opened color codes.
FAQs
256 xterm color codes
The npm package ansi-256-colors receives a total of 3,986 weekly downloads. As such, ansi-256-colors popularity was classified as popular.
We found that ansi-256-colors demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.