MCPcopy Index your code
hub / github.com/codeaashu/claude-code / toInkColor

Function toInkColor

src/utils/ink.ts:15–26  ·  view source on GitHub ↗
(color: string | undefined)

Source from the content-addressed store, hash-verified

13 * Falls back to the raw ANSI color if the color is not a known agent color.
14 */
15export function toInkColor(color: string | undefined): TextProps['color'] {
16 if (!color) {
17 return DEFAULT_AGENT_THEME_COLOR
18 }
19 // Try to map to a theme color if it's a known agent color
20 const themeColor = AGENT_COLOR_TO_THEME_COLOR[color as AgentColorName]
21 if (themeColor) {
22 return themeColor
23 }
24 // Fall back to raw ANSI color for unknown colors
25 return `ansi:${color}` as TextProps['color']
26}
27

Callers 9

TeammateViewHeaderFunction · 0.85
WorkerBadgeFunction · 0.85
TeammateSpinnerLineFunction · 0.85
SpinnerAnimationRowFunction · 0.85
AttachmentMessageFunction · 0.85
TeammateTaskStatusFunction · 0.85
UserTeammateMessageFunction · 0.85
BackgroundTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected