MCPcopy Index your code
hub / github.com/anomalyco/opencode / terminalColors

Function terminalColors

packages/opencode/test/cli/run/theme.test.ts:7–20  ·  view source on GitHub ↗
(input: Partial<TerminalColors> = {})

Source from the content-addressed store, hash-verified

5const palette = ["#15161e", "#f7768e", "#9ece6a", "#e0af68", "#7aa2f7", "#bb9af7", "#7dcfff", "#c0caf5"] as const
6
7function terminalColors(input: Partial<TerminalColors> = {}): TerminalColors {
8 return {
9 palette: Array.from({ length: 256 }, (_, index) => input.palette?.[index] ?? palette[index % palette.length]!),
10 defaultBackground: input.defaultBackground ?? "#1a1b26",
11 defaultForeground: input.defaultForeground ?? "#c0caf5",
12 cursorColor: input.cursorColor ?? "#ff9e64",
13 mouseForeground: input.mouseForeground ?? null,
14 mouseBackground: input.mouseBackground ?? null,
15 tekForeground: input.tekForeground ?? null,
16 tekBackground: input.tekBackground ?? null,
17 highlightBackground: input.highlightBackground ?? "#33467c",
18 highlightForeground: input.highlightForeground ?? "#c0caf5",
19 }
20}
21
22function renderer(
23 input: {

Callers 2

rendererFunction · 0.70
theme.test.tsFile · 0.70

Calls 1

fromMethod · 0.45

Tested by

no test coverage detected