MCPcopy Index your code
hub / github.com/nodejs/node / rgbToAnsi24Bit

Function rgbToAnsi24Bit

lib/util.js:234–236  ·  view source on GitHub ↗

* Generates the ANSI TrueColor (24-bit) escape sequence for a foreground color. * @param {number} r Red component (0-255) * @param {number} g Green component (0-255) * @param {number} b Blue component (0-255) * @returns {string} The ANSI escape sequence

(r, g, b)

Source from the content-addressed store, hash-verified

232 * @returns {string} The ANSI escape sequence
233 */
234function rgbToAnsi24Bit(r, g, b) {
235 return `38;2;${r};${g};${b}`;
236}
237
238/**
239 * @param {string | string[]} format

Callers 2

getHexStyleFunction · 0.85
styleTextFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…