|
| 1 | +/* |
| 2 | + * Copyright (c) 2018-2025 Red Hat, Inc. |
| 3 | + * This program and the accompanying materials are made |
| 4 | + * available under the terms of the Eclipse Public License 2.0 |
| 5 | + * which is available at https://www.eclipse.org/legal/epl-2.0/ |
| 6 | + * |
| 7 | + * SPDX-License-Identifier: EPL-2.0 |
| 8 | + * |
| 9 | + * Contributors: |
| 10 | + * Red Hat, Inc. - initial API and implementation |
| 11 | + */ |
| 12 | + |
| 13 | +// Generated by Claude Opus 4.6 |
| 14 | + |
| 15 | +export interface TerminalTheme { |
| 16 | + foreground: string; |
| 17 | + background: string; |
| 18 | + cursor: string; |
| 19 | + cursorAccent: string; |
| 20 | + selectionBackground: string; |
| 21 | + selectionForeground: string; |
| 22 | + black: string; |
| 23 | + red: string; |
| 24 | + green: string; |
| 25 | + yellow: string; |
| 26 | + blue: string; |
| 27 | + magenta: string; |
| 28 | + cyan: string; |
| 29 | + white: string; |
| 30 | + brightBlack: string; |
| 31 | + brightRed: string; |
| 32 | + brightGreen: string; |
| 33 | + brightYellow: string; |
| 34 | + brightBlue: string; |
| 35 | + brightMagenta: string; |
| 36 | + brightCyan: string; |
| 37 | + brightWhite: string; |
| 38 | +} |
| 39 | + |
| 40 | +export type TerminalThemeName = 'dracula' | 'dark' | 'light'; |
| 41 | + |
| 42 | +export const TERMINAL_THEMES: Record<TerminalThemeName, TerminalTheme> = { |
| 43 | + dracula: { |
| 44 | + foreground: '#f8f8f2', |
| 45 | + background: '#282a36', |
| 46 | + cursor: '#f8f8f2', |
| 47 | + cursorAccent: '#282a36', |
| 48 | + selectionBackground: '#44475a', |
| 49 | + selectionForeground: '#f8f8f2', |
| 50 | + black: '#21222c', |
| 51 | + red: '#ff5555', |
| 52 | + green: '#50fa7b', |
| 53 | + yellow: '#f1fa8c', |
| 54 | + blue: '#bd93f9', |
| 55 | + magenta: '#ff79c6', |
| 56 | + cyan: '#8be9fd', |
| 57 | + white: '#f8f8f2', |
| 58 | + brightBlack: '#6272a4', |
| 59 | + brightRed: '#ff6e6e', |
| 60 | + brightGreen: '#69ff94', |
| 61 | + brightYellow: '#ffffa5', |
| 62 | + brightBlue: '#d6acff', |
| 63 | + brightMagenta: '#ff92df', |
| 64 | + brightCyan: '#a4ffff', |
| 65 | + brightWhite: '#ffffff', |
| 66 | + }, |
| 67 | + dark: { |
| 68 | + foreground: '#d4d4d4', |
| 69 | + background: '#1e1e1e', |
| 70 | + cursor: '#d4d4d4', |
| 71 | + cursorAccent: '#1e1e1e', |
| 72 | + selectionBackground: '#264f78', |
| 73 | + selectionForeground: '#ffffff', |
| 74 | + black: '#000000', |
| 75 | + red: '#cd3131', |
| 76 | + green: '#0dbc79', |
| 77 | + yellow: '#e5e510', |
| 78 | + blue: '#2472c8', |
| 79 | + magenta: '#bc3fbc', |
| 80 | + cyan: '#11a8cd', |
| 81 | + white: '#e5e5e5', |
| 82 | + brightBlack: '#666666', |
| 83 | + brightRed: '#f14c4c', |
| 84 | + brightGreen: '#23d18b', |
| 85 | + brightYellow: '#f5f543', |
| 86 | + brightBlue: '#3b8eea', |
| 87 | + brightMagenta: '#d670d6', |
| 88 | + brightCyan: '#29b8db', |
| 89 | + brightWhite: '#e5e5e5', |
| 90 | + }, |
| 91 | + light: { |
| 92 | + foreground: '#383a42', |
| 93 | + background: '#fafafa', |
| 94 | + cursor: '#6083ad', |
| 95 | + cursorAccent: '#fafafa', |
| 96 | + selectionBackground: '#d7d4f0', |
| 97 | + selectionForeground: '#383a42', |
| 98 | + black: '#000000', |
| 99 | + red: '#e45649', |
| 100 | + green: '#50a14f', |
| 101 | + yellow: '#BDB76B', |
| 102 | + blue: '#4078f2', |
| 103 | + magenta: '#a626a4', |
| 104 | + cyan: '#0184bc', |
| 105 | + white: '#a0a1a7', |
| 106 | + brightBlack: '#5c6370', |
| 107 | + brightRed: '#e06c75', |
| 108 | + brightGreen: '#98c379', |
| 109 | + brightYellow: '#e5c07b', |
| 110 | + brightBlue: '#61afef', |
| 111 | + brightMagenta: '#c678dd', |
| 112 | + brightCyan: '#56b6c2', |
| 113 | + brightWhite: '#909090', |
| 114 | + }, |
| 115 | +}; |
| 116 | + |
| 117 | +export function isTerminalThemeName(value: string): value is TerminalThemeName { |
| 118 | + return value === 'dracula' || value === 'dark' || value === 'light'; |
| 119 | +} |
0 commit comments