(input: Partial<TerminalColors> = {})
| 5 | const palette = ["#15161e", "#f7768e", "#9ece6a", "#e0af68", "#7aa2f7", "#bb9af7", "#7dcfff", "#c0caf5"] as const |
| 6 | |
| 7 | function 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 | |
| 22 | function renderer( |
| 23 | input: { |
no test coverage detected