1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
/**
* @license
* Copyright 2025 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { type ColorsTheme, Theme } from './theme.js';
import { darkSemanticColors } from './semantic-tokens.js';
const ansiColors: ColorsTheme = {
type: 'dark',
Background: 'black',
Foreground: 'white',
LightBlue: 'bluebright',
AccentBlue: 'blue',
AccentPurple: 'magenta',
AccentCyan: 'cyan',
AccentGreen: 'green',
AccentYellow: 'yellow',
AccentRed: 'red',
DiffAdded: '#003300',
DiffRemoved: '#4D0000',
Comment: 'gray',
Gray: 'gray',
GradientColors: ['cyan', 'green'],
};
export const ANSI: Theme = new Theme(
'ANSI',
'dark', // Consistent with its color palette base
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: 'black', // Mapped from #1E1E1E
color: 'white', // Mapped from #DCDCDC
},
'hljs-keyword': {
color: 'blue', // Mapped from #569CD6
},
'hljs-literal': {
color: 'blue', // Mapped from #569CD6
},
'hljs-symbol': {
color: 'blue', // Mapped from #569CD6
},
'hljs-name': {
color: 'blue', // Mapped from #569CD6
},
'hljs-link': {
color: 'blue', // Mapped from #569CD6
// textDecoration is ignored by Theme class
},
'hljs-built_in': {
color: 'cyan', // Mapped from #4EC9B0
},
'hljs-type': {
color: 'cyan', // Mapped from #4EC9B0
},
'hljs-number': {
color: 'green', // Mapped from #B8D7A3
},
'hljs-class': {
color: 'green', // Mapped from #B8D7A3
},
'hljs-string': {
color: 'yellow', // Mapped from #D69D85
},
'hljs-meta-string': {
color: 'yellow', // Mapped from #D69D85
},
'hljs-regexp': {
color: 'red', // Mapped from #9A5334
},
'hljs-template-tag': {
color: 'red', // Mapped from #9A5334
},
'hljs-subst': {
color: 'white', // Mapped from #DCDCDC
},
'hljs-function': {
color: 'white', // Mapped from #DCDCDC
},
'hljs-title': {
color: 'white', // Mapped from #DCDCDC
},
'hljs-params': {
color: 'white', // Mapped from #DCDCDC
},
'hljs-formula': {
color: 'white', // Mapped from #DCDCDC
},
'hljs-comment': {
color: 'green', // Mapped from #57A64A
// fontStyle is ignored by Theme class
},
'hljs-quote': {
color: 'green', // Mapped from #57A64A
// fontStyle is ignored by Theme class
},
'hljs-doctag': {
color: 'green', // Mapped from #608B4E
},
'hljs-meta': {
color: 'gray', // Mapped from #9B9B9B
},
'hljs-meta-keyword': {
color: 'gray', // Mapped from #9B9B9B
},
'hljs-tag': {
color: 'gray', // Mapped from #9B9B9B
},
'hljs-variable': {
color: 'magenta', // Mapped from #BD63C5
},
'hljs-template-variable': {
color: 'magenta', // Mapped from #BD63C5
},
'hljs-attr': {
color: 'bluebright', // Mapped from #9CDCFE
},
'hljs-attribute': {
color: 'bluebright', // Mapped from #9CDCFE
},
'hljs-builtin-name': {
color: 'bluebright', // Mapped from #9CDCFE
},
'hljs-section': {
color: 'yellow', // Mapped from gold
},
'hljs-emphasis': {
// fontStyle is ignored by Theme class
},
'hljs-strong': {
// fontWeight is ignored by Theme class
},
'hljs-bullet': {
color: 'yellow', // Mapped from #D7BA7D
},
'hljs-selector-tag': {
color: 'yellow', // Mapped from #D7BA7D
},
'hljs-selector-id': {
color: 'yellow', // Mapped from #D7BA7D
},
'hljs-selector-class': {
color: 'yellow', // Mapped from #D7BA7D
},
'hljs-selector-attr': {
color: 'yellow', // Mapped from #D7BA7D
},
'hljs-selector-pseudo': {
color: 'yellow', // Mapped from #D7BA7D
},
},
ansiColors,
darkSemanticColors,
);
|