MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / printBanner

Function printBanner

packages/cli/src/ui/banner.ts:48–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46// ---------------------------------------------------------------------------
47
48export function printBanner(): void {
49 if (!isColorSupported || !process.stdout.isTTY) return;
50
51 const maxWidth = Math.max(...BANNER.map((r) => r.length));
52
53 console.log();
54 for (const row of BANNER) {
55 let line = " ";
56 for (let col = 0; col < row.length; col++) {
57 const ch = row[col];
58 if (!ch || ch === " ") {
59 line += " ";
60 continue;
61 }
62 const t = maxWidth > 1 ? col / (maxWidth - 1) : 0;
63 const [r, g, b] = gradientColor(t);
64 line += rgb(r, g, b, ch);
65 }
66 console.log(line);
67 }
68 console.log();
69}

Callers 1

runFunction · 0.85

Calls 2

gradientColorFunction · 0.85
rgbFunction · 0.70

Tested by

no test coverage detected