MCPcopy Create free account
hub / github.com/anomalyco/opencode / draw

Function draw

packages/tui/src/util/presentation.ts:11–20  ·  view source on GitHub ↗
(line: string, fg: string, shadow: string, bg: string)

Source from the content-addressed store, hash-verified

9
10function wordmark(pad = "") {
11 const draw = (line: string, fg: string, shadow: string, bg: string) =>
12 [...line]
13 .map((char) => {
14 if (char === "_") return `${bg} ${reset}`
15 if (char === "^") return `${fg}${bg}▀${reset}`
16 if (char === "~") return `${shadow}▀${reset}`
17 if (char === " ") return " "
18 return `${fg}${char}${reset}`
19 })
20 .join("")
21
22 return logo.left.map((line, index) => {
23 const left = draw(line, dim, "\x1b[38;5;235m", "\x1b[48;5;235m")

Callers 1

wordmarkFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected