refactor(cli): categorize built-in themes into dark/ and light/ directories (#18634)

This commit is contained in:
JAYADITYA
2026-03-05 14:50:46 +05:30
committed by GitHub
parent 3d4956aa57
commit 013d5dfbb0
24 changed files with 77 additions and 77 deletions
@@ -0,0 +1,161 @@
/**
* @license
* Copyright 2026 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: '',
LightBlue: 'bluebright',
AccentBlue: 'blue',
AccentPurple: 'magenta',
AccentCyan: 'cyan',
AccentGreen: 'green',
AccentYellow: 'yellow',
AccentRed: 'red',
DiffAdded: '#003300',
DiffRemoved: '#4D0000',
Comment: 'gray',
Gray: 'gray',
DarkGray: 'gray',
FocusBackground: 'black',
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,
);
@@ -0,0 +1,147 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { type ColorsTheme, Theme } from '../../theme.js';
import { interpolateColor } from '../../color-utils.js';
const atomOneDarkColors: ColorsTheme = {
type: 'dark',
Background: '#282c34',
Foreground: '#abb2bf',
LightBlue: '#61aeee',
AccentBlue: '#61aeee',
AccentPurple: '#c678dd',
AccentCyan: '#56b6c2',
AccentGreen: '#98c379',
AccentYellow: '#e6c07b',
AccentRed: '#e06c75',
DiffAdded: '#39544E',
DiffRemoved: '#562B2F',
Comment: '#5c6370',
Gray: '#5c6370',
DarkGray: interpolateColor('#5c6370', '#282c34', 0.5),
GradientColors: ['#61aeee', '#98c379'],
};
export const AtomOneDark: Theme = new Theme(
'Atom One',
'dark',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
color: atomOneDarkColors.Foreground,
background: atomOneDarkColors.Background,
},
'hljs-comment': {
color: atomOneDarkColors.Comment,
fontStyle: 'italic',
},
'hljs-quote': {
color: atomOneDarkColors.Comment,
fontStyle: 'italic',
},
'hljs-doctag': {
color: atomOneDarkColors.AccentPurple,
},
'hljs-keyword': {
color: atomOneDarkColors.AccentPurple,
},
'hljs-formula': {
color: atomOneDarkColors.AccentPurple,
},
'hljs-section': {
color: atomOneDarkColors.AccentRed,
},
'hljs-name': {
color: atomOneDarkColors.AccentRed,
},
'hljs-selector-tag': {
color: atomOneDarkColors.AccentRed,
},
'hljs-deletion': {
color: atomOneDarkColors.AccentRed,
},
'hljs-subst': {
color: atomOneDarkColors.AccentRed,
},
'hljs-literal': {
color: atomOneDarkColors.AccentCyan,
},
'hljs-string': {
color: atomOneDarkColors.AccentGreen,
},
'hljs-regexp': {
color: atomOneDarkColors.AccentGreen,
},
'hljs-addition': {
color: atomOneDarkColors.AccentGreen,
},
'hljs-attribute': {
color: atomOneDarkColors.AccentGreen,
},
'hljs-meta-string': {
color: atomOneDarkColors.AccentGreen,
},
'hljs-built_in': {
color: atomOneDarkColors.AccentYellow,
},
'hljs-class .hljs-title': {
color: atomOneDarkColors.AccentYellow,
},
'hljs-attr': {
color: atomOneDarkColors.AccentYellow,
},
'hljs-variable': {
color: atomOneDarkColors.AccentYellow,
},
'hljs-template-variable': {
color: atomOneDarkColors.AccentYellow,
},
'hljs-type': {
color: atomOneDarkColors.AccentYellow,
},
'hljs-selector-class': {
color: atomOneDarkColors.AccentYellow,
},
'hljs-selector-attr': {
color: atomOneDarkColors.AccentYellow,
},
'hljs-selector-pseudo': {
color: atomOneDarkColors.AccentYellow,
},
'hljs-number': {
color: atomOneDarkColors.AccentYellow,
},
'hljs-symbol': {
color: atomOneDarkColors.AccentBlue,
},
'hljs-bullet': {
color: atomOneDarkColors.AccentBlue,
},
'hljs-link': {
color: atomOneDarkColors.AccentBlue,
textDecoration: 'underline',
},
'hljs-meta': {
color: atomOneDarkColors.AccentBlue,
},
'hljs-selector-id': {
color: atomOneDarkColors.AccentBlue,
},
'hljs-title': {
color: atomOneDarkColors.AccentBlue,
},
'hljs-emphasis': {
fontStyle: 'italic',
},
'hljs-strong': {
fontWeight: 'bold',
},
},
atomOneDarkColors,
);
@@ -0,0 +1,113 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { type ColorsTheme, Theme } from '../../theme.js';
import { interpolateColor } from '../../color-utils.js';
const ayuDarkColors: ColorsTheme = {
type: 'dark',
Background: '#0b0e14',
Foreground: '#aeaca6',
LightBlue: '#59C2FF',
AccentBlue: '#39BAE6',
AccentPurple: '#D2A6FF',
AccentCyan: '#95E6CB',
AccentGreen: '#AAD94C',
AccentYellow: '#FFB454',
AccentRed: '#F26D78',
DiffAdded: '#293022',
DiffRemoved: '#3D1215',
Comment: '#646A71',
Gray: '#3D4149',
DarkGray: interpolateColor('#3D4149', '#0b0e14', 0.5),
GradientColors: ['#FFB454', '#F26D78'],
};
export const AyuDark: Theme = new Theme(
'Ayu',
'dark',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: ayuDarkColors.Background,
color: ayuDarkColors.Foreground,
},
'hljs-keyword': {
color: ayuDarkColors.AccentYellow,
},
'hljs-literal': {
color: ayuDarkColors.AccentPurple,
},
'hljs-symbol': {
color: ayuDarkColors.AccentCyan,
},
'hljs-name': {
color: ayuDarkColors.LightBlue,
},
'hljs-link': {
color: ayuDarkColors.AccentBlue,
},
'hljs-function .hljs-keyword': {
color: ayuDarkColors.AccentYellow,
},
'hljs-subst': {
color: ayuDarkColors.Foreground,
},
'hljs-string': {
color: ayuDarkColors.AccentGreen,
},
'hljs-title': {
color: ayuDarkColors.AccentYellow,
},
'hljs-type': {
color: ayuDarkColors.AccentBlue,
},
'hljs-attribute': {
color: ayuDarkColors.AccentYellow,
},
'hljs-bullet': {
color: ayuDarkColors.AccentYellow,
},
'hljs-addition': {
color: ayuDarkColors.AccentGreen,
},
'hljs-variable': {
color: ayuDarkColors.Foreground,
},
'hljs-template-tag': {
color: ayuDarkColors.AccentYellow,
},
'hljs-template-variable': {
color: ayuDarkColors.AccentYellow,
},
'hljs-comment': {
color: ayuDarkColors.Comment,
fontStyle: 'italic',
},
'hljs-quote': {
color: ayuDarkColors.AccentCyan,
fontStyle: 'italic',
},
'hljs-deletion': {
color: ayuDarkColors.AccentRed,
},
'hljs-meta': {
color: ayuDarkColors.AccentYellow,
},
'hljs-doctag': {
fontWeight: 'bold',
},
'hljs-strong': {
fontWeight: 'bold',
},
'hljs-emphasis': {
fontStyle: 'italic',
},
},
ayuDarkColors,
);
@@ -0,0 +1,149 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { darkTheme, Theme } from '../../theme.js';
export const DefaultDark: Theme = new Theme(
'Default',
'dark',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: darkTheme.Background,
color: darkTheme.Foreground,
},
'hljs-keyword': {
color: darkTheme.AccentBlue,
},
'hljs-literal': {
color: darkTheme.AccentBlue,
},
'hljs-symbol': {
color: darkTheme.AccentBlue,
},
'hljs-name': {
color: darkTheme.AccentBlue,
},
'hljs-link': {
color: darkTheme.AccentBlue,
textDecoration: 'underline',
},
'hljs-built_in': {
color: darkTheme.AccentCyan,
},
'hljs-type': {
color: darkTheme.AccentCyan,
},
'hljs-number': {
color: darkTheme.AccentGreen,
},
'hljs-class': {
color: darkTheme.AccentGreen,
},
'hljs-string': {
color: darkTheme.AccentYellow,
},
'hljs-meta-string': {
color: darkTheme.AccentYellow,
},
'hljs-regexp': {
color: darkTheme.AccentRed,
},
'hljs-template-tag': {
color: darkTheme.AccentRed,
},
'hljs-subst': {
color: darkTheme.Foreground,
},
'hljs-function': {
color: darkTheme.Foreground,
},
'hljs-title': {
color: darkTheme.Foreground,
},
'hljs-params': {
color: darkTheme.Foreground,
},
'hljs-formula': {
color: darkTheme.Foreground,
},
'hljs-comment': {
color: darkTheme.Comment,
fontStyle: 'italic',
},
'hljs-quote': {
color: darkTheme.Comment,
fontStyle: 'italic',
},
'hljs-doctag': {
color: darkTheme.Comment,
},
'hljs-meta': {
color: darkTheme.Gray,
},
'hljs-meta-keyword': {
color: darkTheme.Gray,
},
'hljs-tag': {
color: darkTheme.Gray,
},
'hljs-variable': {
color: darkTheme.AccentPurple,
},
'hljs-template-variable': {
color: darkTheme.AccentPurple,
},
'hljs-attr': {
color: darkTheme.LightBlue,
},
'hljs-attribute': {
color: darkTheme.LightBlue,
},
'hljs-builtin-name': {
color: darkTheme.LightBlue,
},
'hljs-section': {
color: darkTheme.AccentYellow,
},
'hljs-emphasis': {
fontStyle: 'italic',
},
'hljs-strong': {
fontWeight: 'bold',
},
'hljs-bullet': {
color: darkTheme.AccentYellow,
},
'hljs-selector-tag': {
color: darkTheme.AccentYellow,
},
'hljs-selector-id': {
color: darkTheme.AccentYellow,
},
'hljs-selector-class': {
color: darkTheme.AccentYellow,
},
'hljs-selector-attr': {
color: darkTheme.AccentYellow,
},
'hljs-selector-pseudo': {
color: darkTheme.AccentYellow,
},
'hljs-addition': {
backgroundColor: '#144212',
display: 'inline-block',
width: '100%',
},
'hljs-deletion': {
backgroundColor: '#600',
display: 'inline-block',
width: '100%',
},
},
darkTheme,
);
@@ -0,0 +1,124 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { type ColorsTheme, Theme } from '../../theme.js';
import { interpolateColor } from '../../color-utils.js';
const draculaColors: ColorsTheme = {
type: 'dark',
Background: '#282a36',
Foreground: '#a3afb7',
LightBlue: '#8be9fd',
AccentBlue: '#8be9fd',
AccentPurple: '#ff79c6',
AccentCyan: '#8be9fd',
AccentGreen: '#50fa7b',
AccentYellow: '#fff783',
AccentRed: '#ff5555',
DiffAdded: '#11431d',
DiffRemoved: '#6e1818',
Comment: '#6272a4',
Gray: '#6272a4',
DarkGray: interpolateColor('#6272a4', '#282a36', 0.5),
GradientColors: ['#ff79c6', '#8be9fd'],
};
export const Dracula: Theme = new Theme(
'Dracula',
'dark',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: draculaColors.Background,
color: draculaColors.Foreground,
},
'hljs-keyword': {
color: draculaColors.AccentBlue,
fontWeight: 'bold',
},
'hljs-selector-tag': {
color: draculaColors.AccentBlue,
fontWeight: 'bold',
},
'hljs-literal': {
color: draculaColors.AccentBlue,
fontWeight: 'bold',
},
'hljs-section': {
color: draculaColors.AccentBlue,
fontWeight: 'bold',
},
'hljs-link': {
color: draculaColors.AccentBlue,
},
'hljs-function .hljs-keyword': {
color: draculaColors.AccentPurple,
},
'hljs-subst': {
color: draculaColors.Foreground,
},
'hljs-string': {
color: draculaColors.AccentYellow,
},
'hljs-title': {
color: draculaColors.AccentYellow,
fontWeight: 'bold',
},
'hljs-name': {
color: draculaColors.AccentYellow,
fontWeight: 'bold',
},
'hljs-type': {
color: draculaColors.AccentYellow,
fontWeight: 'bold',
},
'hljs-attribute': {
color: draculaColors.AccentYellow,
},
'hljs-symbol': {
color: draculaColors.AccentYellow,
},
'hljs-bullet': {
color: draculaColors.AccentYellow,
},
'hljs-addition': {
color: draculaColors.AccentGreen,
},
'hljs-variable': {
color: draculaColors.AccentYellow,
},
'hljs-template-tag': {
color: draculaColors.AccentYellow,
},
'hljs-template-variable': {
color: draculaColors.AccentYellow,
},
'hljs-comment': {
color: draculaColors.Comment,
},
'hljs-quote': {
color: draculaColors.Comment,
},
'hljs-deletion': {
color: draculaColors.AccentRed,
},
'hljs-meta': {
color: draculaColors.Comment,
},
'hljs-doctag': {
fontWeight: 'bold',
},
'hljs-strong': {
fontWeight: 'bold',
},
'hljs-emphasis': {
fontStyle: 'italic',
},
},
draculaColors,
);
@@ -0,0 +1,147 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { type ColorsTheme, Theme } from '../../theme.js';
import { interpolateColor } from '../../color-utils.js';
const githubDarkColors: ColorsTheme = {
type: 'dark',
Background: '#24292e',
Foreground: '#c0c4c8',
LightBlue: '#79B8FF',
AccentBlue: '#79B8FF',
AccentPurple: '#B392F0',
AccentCyan: '#9ECBFF',
AccentGreen: '#85E89D',
AccentYellow: '#FFAB70',
AccentRed: '#F97583',
DiffAdded: '#3C4636',
DiffRemoved: '#502125',
Comment: '#6A737D',
Gray: '#6A737D',
DarkGray: interpolateColor('#6A737D', '#24292e', 0.5),
GradientColors: ['#79B8FF', '#85E89D'],
};
export const GitHubDark: Theme = new Theme(
'GitHub',
'dark',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
color: githubDarkColors.Foreground,
background: githubDarkColors.Background,
},
'hljs-comment': {
color: githubDarkColors.Comment,
fontStyle: 'italic',
},
'hljs-quote': {
color: githubDarkColors.Comment,
fontStyle: 'italic',
},
'hljs-keyword': {
color: githubDarkColors.AccentRed,
fontWeight: 'bold',
},
'hljs-selector-tag': {
color: githubDarkColors.AccentRed,
fontWeight: 'bold',
},
'hljs-subst': {
color: githubDarkColors.Foreground,
},
'hljs-number': {
color: githubDarkColors.LightBlue,
},
'hljs-literal': {
color: githubDarkColors.LightBlue,
},
'hljs-variable': {
color: githubDarkColors.AccentYellow,
},
'hljs-template-variable': {
color: githubDarkColors.AccentYellow,
},
'hljs-tag .hljs-attr': {
color: githubDarkColors.AccentYellow,
},
'hljs-string': {
color: githubDarkColors.AccentCyan,
},
'hljs-doctag': {
color: githubDarkColors.AccentCyan,
},
'hljs-title': {
color: githubDarkColors.AccentPurple,
fontWeight: 'bold',
},
'hljs-section': {
color: githubDarkColors.AccentPurple,
fontWeight: 'bold',
},
'hljs-selector-id': {
color: githubDarkColors.AccentPurple,
fontWeight: 'bold',
},
'hljs-type': {
color: githubDarkColors.AccentGreen,
fontWeight: 'bold',
},
'hljs-class .hljs-title': {
color: githubDarkColors.AccentGreen,
fontWeight: 'bold',
},
'hljs-tag': {
color: githubDarkColors.AccentGreen,
},
'hljs-name': {
color: githubDarkColors.AccentGreen,
},
'hljs-attribute': {
color: githubDarkColors.LightBlue,
},
'hljs-regexp': {
color: githubDarkColors.AccentCyan,
},
'hljs-link': {
color: githubDarkColors.AccentCyan,
},
'hljs-symbol': {
color: githubDarkColors.AccentPurple,
},
'hljs-bullet': {
color: githubDarkColors.AccentPurple,
},
'hljs-built_in': {
color: githubDarkColors.LightBlue,
},
'hljs-builtin-name': {
color: githubDarkColors.LightBlue,
},
'hljs-meta': {
color: githubDarkColors.LightBlue,
fontWeight: 'bold',
},
'hljs-deletion': {
background: '#86181D',
color: githubDarkColors.AccentRed,
},
'hljs-addition': {
background: '#144620',
color: githubDarkColors.AccentGreen,
},
'hljs-emphasis': {
fontStyle: 'italic',
},
'hljs-strong': {
fontWeight: 'bold',
},
},
githubDarkColors,
);
@@ -0,0 +1,170 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { type ColorsTheme, Theme } from '../../theme.js';
import { interpolateColor } from '../../color-utils.js';
const holidayColors: ColorsTheme = {
type: 'dark',
Background: '#00210e',
Foreground: '#F0F8FF',
LightBlue: '#B0E0E6',
AccentBlue: '#3CB371',
AccentPurple: '#FF9999',
AccentCyan: '#33F9FF',
AccentGreen: '#3CB371',
AccentYellow: '#FFEE8C',
AccentRed: '#FF6347',
DiffAdded: '#2E8B57',
DiffRemoved: '#CD5C5C',
Comment: '#8FBC8F',
Gray: '#D7F5D3',
DarkGray: interpolateColor('#D7F5D3', '#151B18', 0.5),
FocusColor: '#33F9FF', // AccentCyan for neon pop
GradientColors: ['#FF0000', '#FFFFFF', '#008000'],
};
export const Holiday: Theme = new Theme(
'Holiday',
'dark',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: holidayColors.Background,
color: holidayColors.Foreground,
},
'hljs-keyword': {
color: holidayColors.AccentBlue,
},
'hljs-literal': {
color: holidayColors.AccentBlue,
},
'hljs-symbol': {
color: holidayColors.AccentBlue,
},
'hljs-name': {
color: holidayColors.AccentBlue,
},
'hljs-link': {
color: holidayColors.AccentBlue,
textDecoration: 'underline',
},
'hljs-built_in': {
color: holidayColors.AccentCyan,
},
'hljs-type': {
color: holidayColors.AccentCyan,
},
'hljs-number': {
color: holidayColors.AccentGreen,
},
'hljs-class': {
color: holidayColors.AccentGreen,
},
'hljs-string': {
color: holidayColors.AccentYellow,
},
'hljs-meta-string': {
color: holidayColors.AccentYellow,
},
'hljs-regexp': {
color: holidayColors.AccentRed,
},
'hljs-template-tag': {
color: holidayColors.AccentRed,
},
'hljs-subst': {
color: holidayColors.Foreground,
},
'hljs-function': {
color: holidayColors.Foreground,
},
'hljs-title': {
color: holidayColors.Foreground,
},
'hljs-params': {
color: holidayColors.Foreground,
},
'hljs-formula': {
color: holidayColors.Foreground,
},
'hljs-comment': {
color: holidayColors.Comment,
fontStyle: 'italic',
},
'hljs-quote': {
color: holidayColors.Comment,
fontStyle: 'italic',
},
'hljs-doctag': {
color: holidayColors.Comment,
},
'hljs-meta': {
color: holidayColors.Gray,
},
'hljs-meta-keyword': {
color: holidayColors.Gray,
},
'hljs-tag': {
color: holidayColors.Gray,
},
'hljs-variable': {
color: holidayColors.AccentPurple,
},
'hljs-template-variable': {
color: holidayColors.AccentPurple,
},
'hljs-attr': {
color: holidayColors.LightBlue,
},
'hljs-attribute': {
color: holidayColors.LightBlue,
},
'hljs-builtin-name': {
color: holidayColors.LightBlue,
},
'hljs-section': {
color: holidayColors.AccentYellow,
},
'hljs-emphasis': {
fontStyle: 'italic',
},
'hljs-strong': {
fontWeight: 'bold',
},
'hljs-bullet': {
color: holidayColors.AccentYellow,
},
'hljs-selector-tag': {
color: holidayColors.AccentYellow,
},
'hljs-selector-id': {
color: holidayColors.AccentYellow,
},
'hljs-selector-class': {
color: holidayColors.AccentYellow,
},
'hljs-selector-attr': {
color: holidayColors.AccentYellow,
},
'hljs-selector-pseudo': {
color: holidayColors.AccentYellow,
},
'hljs-addition': {
backgroundColor: holidayColors.DiffAdded,
display: 'inline-block',
width: '100%',
},
'hljs-deletion': {
backgroundColor: holidayColors.DiffRemoved,
display: 'inline-block',
width: '100%',
},
},
holidayColors,
);
@@ -0,0 +1,352 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
/**
* Shades of Purple Theme — for Highlight.js.
* @author Ahmad Awais <https://twitter.com/mrahmadawais/>
*/
import { type ColorsTheme, Theme } from '../../theme.js';
import { interpolateColor } from '../../color-utils.js';
const shadesOfPurpleColors: ColorsTheme = {
type: 'dark',
// Required colors for ColorsTheme interface
Background: '#1e1e3f', // Main background in the VSCode terminal.
Foreground: '#e3dfff', // Default text color (hljs, hljs-subst)
LightBlue: '#847ace', // Light blue/purple accent
AccentBlue: '#a599e9', // Borders, secondary blue
AccentPurple: '#ac65ff', // Comments (main purple)
AccentCyan: '#a1feff', // Names
AccentGreen: '#A5FF90', // Strings and many others
AccentYellow: '#fad000', // Title, main yellow
AccentRed: '#ff628c', // Error/deletion accent
DiffAdded: '#383E45',
DiffRemoved: '#572244',
Comment: '#B362FF', // Comment color (same as AccentPurple)
Gray: '#726c86', // Gray color
DarkGray: interpolateColor('#726c86', '#2d2b57', 0.5),
GradientColors: ['#4d21fc', '#847ace', '#ff628c'],
};
// Additional colors from CSS that don't fit in the ColorsTheme interface
const additionalColors = {
AccentYellowAlt: '#f8d000', // Attr yellow (slightly different)
AccentOrange: '#fb9e00', // Keywords, built_in, meta
AccentPink: '#fa658d', // Numbers, literals
AccentLightPurple: '#c991ff', // For params and properties
AccentDarkPurple: '#6943ff', // For operators
AccentTeal: '#2ee2fa', // For special constructs
};
export const ShadesOfPurple = new Theme(
'Shades Of Purple',
'dark',
{
// Base styles
hljs: {
display: 'block',
overflowX: 'auto',
background: shadesOfPurpleColors.Background,
color: shadesOfPurpleColors.Foreground,
},
// Title elements
'hljs-title': {
color: shadesOfPurpleColors.AccentYellow,
fontWeight: 'normal',
},
// Names
'hljs-name': {
color: shadesOfPurpleColors.AccentCyan,
fontWeight: 'normal',
},
// Tags
'hljs-tag': {
color: shadesOfPurpleColors.Foreground,
},
// Attributes
'hljs-attr': {
color: additionalColors.AccentYellowAlt,
fontStyle: 'italic',
},
// Built-ins, selector tags, sections
'hljs-built_in': {
color: additionalColors.AccentOrange,
},
'hljs-selector-tag': {
color: additionalColors.AccentOrange,
fontWeight: 'normal',
},
'hljs-section': {
color: additionalColors.AccentOrange,
},
// Keywords
'hljs-keyword': {
color: additionalColors.AccentOrange,
fontWeight: 'normal',
},
// Default text and substitutions
'hljs-subst': {
color: shadesOfPurpleColors.Foreground,
},
// Strings and related elements (all green)
'hljs-string': {
color: shadesOfPurpleColors.AccentGreen,
},
'hljs-attribute': {
color: shadesOfPurpleColors.AccentGreen,
},
'hljs-symbol': {
color: shadesOfPurpleColors.AccentGreen,
},
'hljs-bullet': {
color: shadesOfPurpleColors.AccentGreen,
},
'hljs-addition': {
color: shadesOfPurpleColors.AccentGreen,
},
'hljs-code': {
color: shadesOfPurpleColors.AccentGreen,
},
'hljs-regexp': {
color: shadesOfPurpleColors.AccentGreen,
},
'hljs-selector-class': {
color: shadesOfPurpleColors.AccentGreen,
},
'hljs-selector-attr': {
color: shadesOfPurpleColors.AccentGreen,
},
'hljs-selector-pseudo': {
color: shadesOfPurpleColors.AccentGreen,
},
'hljs-template-tag': {
color: shadesOfPurpleColors.AccentGreen,
},
'hljs-quote': {
color: shadesOfPurpleColors.AccentGreen,
},
'hljs-deletion': {
color: shadesOfPurpleColors.AccentRed,
},
// Meta elements
'hljs-meta': {
color: additionalColors.AccentOrange,
},
'hljs-meta-string': {
color: additionalColors.AccentOrange,
},
// Comments
'hljs-comment': {
color: shadesOfPurpleColors.AccentPurple,
},
// Literals and numbers
'hljs-literal': {
color: additionalColors.AccentPink,
fontWeight: 'normal',
},
'hljs-number': {
color: additionalColors.AccentPink,
},
// Emphasis and strong
'hljs-emphasis': {
fontStyle: 'italic',
},
'hljs-strong': {
fontWeight: 'bold',
},
// Diff-specific classes
'hljs-diff': {
color: shadesOfPurpleColors.Foreground,
},
'hljs-meta.hljs-diff': {
color: shadesOfPurpleColors.AccentBlue,
},
'hljs-ln': {
color: shadesOfPurpleColors.Gray,
},
// Additional elements that might be needed
'hljs-type': {
color: shadesOfPurpleColors.AccentYellow,
fontWeight: 'normal',
},
'hljs-variable': {
color: shadesOfPurpleColors.AccentYellow,
},
'hljs-template-variable': {
color: shadesOfPurpleColors.AccentGreen,
},
'hljs-function .hljs-keyword': {
color: additionalColors.AccentOrange,
},
'hljs-link': {
color: shadesOfPurpleColors.LightBlue,
},
'hljs-doctag': {
fontWeight: 'bold',
},
// Function parameters
'hljs-params': {
color: additionalColors.AccentLightPurple,
fontStyle: 'italic',
},
// Class definitions
'hljs-class': {
color: shadesOfPurpleColors.AccentCyan,
fontWeight: 'bold',
},
// Function definitions
'hljs-function': {
color: shadesOfPurpleColors.AccentCyan,
},
// Object properties
'hljs-property': {
color: shadesOfPurpleColors.AccentBlue,
},
// Operators
'hljs-operator': {
color: additionalColors.AccentDarkPurple,
},
// Punctuation (if supported by the parser)
'hljs-punctuation': {
color: shadesOfPurpleColors.Gray,
},
// CSS ID selectors
'hljs-selector-id': {
color: shadesOfPurpleColors.AccentYellow,
fontWeight: 'bold',
},
// Character literals
'hljs-char': {
color: shadesOfPurpleColors.AccentGreen,
},
// Escape sequences
'hljs-escape': {
color: additionalColors.AccentPink,
fontWeight: 'bold',
},
// Meta keywords
'hljs-meta-keyword': {
color: additionalColors.AccentOrange,
fontWeight: 'bold',
},
// Built-in names
'hljs-builtin-name': {
color: additionalColors.AccentTeal,
},
// Modules
'hljs-module': {
color: shadesOfPurpleColors.AccentCyan,
},
// Namespaces
'hljs-namespace': {
color: shadesOfPurpleColors.LightBlue,
},
// Important annotations
'hljs-important': {
color: shadesOfPurpleColors.AccentRed,
fontWeight: 'bold',
},
// Formulas (for LaTeX, etc.)
'hljs-formula': {
color: shadesOfPurpleColors.AccentCyan,
fontStyle: 'italic',
},
// Language-specific additions
// Python decorators
'hljs-decorator': {
color: additionalColors.AccentTeal,
fontWeight: 'bold',
},
// Ruby symbols
'hljs-symbol.ruby': {
color: additionalColors.AccentPink,
},
// SQL keywords
'hljs-keyword.sql': {
color: additionalColors.AccentOrange,
textTransform: 'uppercase',
},
// Markdown specific
'hljs-section.markdown': {
color: shadesOfPurpleColors.AccentYellow,
fontWeight: 'bold',
},
// JSON keys
'hljs-attr.json': {
color: shadesOfPurpleColors.AccentCyan,
},
// XML/HTML specific
'hljs-tag .hljs-name': {
color: shadesOfPurpleColors.AccentRed,
},
'hljs-tag .hljs-attr': {
color: additionalColors.AccentYellowAlt,
},
// Line highlighting (if line numbers are enabled)
'hljs.hljs-line-numbers': {
borderRight: `1px solid ${shadesOfPurpleColors.Gray}`,
},
'hljs.hljs-line-numbers .hljs-ln-numbers': {
color: shadesOfPurpleColors.Gray,
paddingRight: '1em',
},
'hljs.hljs-line-numbers .hljs-ln-code': {
paddingLeft: '1em',
},
// Selection styling
'hljs::selection': {
background: shadesOfPurpleColors.AccentBlue + '40', // 40 = 25% opacity
},
'hljs ::-moz-selection': {
background: shadesOfPurpleColors.AccentBlue + '40',
},
// Highlighted lines (for emphasis)
'hljs .hljs-highlight': {
background: shadesOfPurpleColors.AccentPurple + '20', // 20 = 12.5% opacity
display: 'block',
width: '100%',
},
},
shadesOfPurpleColors,
);
@@ -0,0 +1,207 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { type ColorsTheme, Theme, interpolateColor } from '../../theme.js';
import { type SemanticColors } from '../../semantic-tokens.js';
import { DEFAULT_SELECTION_OPACITY } from '../../../constants.js';
const solarizedDarkColors: ColorsTheme = {
type: 'dark',
Background: '#002b36',
Foreground: '#839496',
LightBlue: '#268bd2',
AccentBlue: '#268bd2',
AccentPurple: '#6c71c4',
AccentCyan: '#2aa198',
AccentGreen: '#859900',
AccentYellow: '#d0b000',
AccentRed: '#dc322f',
DiffAdded: '#859900',
DiffRemoved: '#dc322f',
Comment: '#586e75',
Gray: '#586e75',
DarkGray: '#073642',
GradientColors: ['#268bd2', '#2aa198'],
};
const semanticColors: SemanticColors = {
text: {
primary: '#839496',
secondary: '#586e75',
link: '#268bd2',
accent: '#268bd2',
response: '#839496',
},
background: {
primary: '#002b36',
message: '#073642',
input: '#073642',
focus: interpolateColor('#002b36', '#859900', DEFAULT_SELECTION_OPACITY),
diff: {
added: '#00382f',
removed: '#3d0115',
},
},
border: {
default: '#073642',
},
ui: {
comment: '#586e75',
symbol: '#93a1a1',
active: '#268bd2',
dark: '#073642',
focus: '#859900',
gradient: ['#268bd2', '#2aa198', '#859900'],
},
status: {
success: '#859900',
warning: '#d0b000',
error: '#dc322f',
},
};
export const SolarizedDark: Theme = new Theme(
'Solarized Dark',
'dark',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: solarizedDarkColors.Background,
color: solarizedDarkColors.Foreground,
},
'hljs-keyword': {
color: solarizedDarkColors.AccentBlue,
},
'hljs-literal': {
color: solarizedDarkColors.AccentBlue,
},
'hljs-symbol': {
color: solarizedDarkColors.AccentBlue,
},
'hljs-name': {
color: solarizedDarkColors.AccentBlue,
},
'hljs-link': {
color: solarizedDarkColors.AccentBlue,
textDecoration: 'underline',
},
'hljs-built_in': {
color: solarizedDarkColors.AccentCyan,
},
'hljs-type': {
color: solarizedDarkColors.AccentCyan,
},
'hljs-number': {
color: solarizedDarkColors.AccentGreen,
},
'hljs-class': {
color: solarizedDarkColors.AccentGreen,
},
'hljs-string': {
color: solarizedDarkColors.AccentYellow,
},
'hljs-meta-string': {
color: solarizedDarkColors.AccentYellow,
},
'hljs-regexp': {
color: solarizedDarkColors.AccentRed,
},
'hljs-template-tag': {
color: solarizedDarkColors.AccentRed,
},
'hljs-subst': {
color: solarizedDarkColors.Foreground,
},
'hljs-function': {
color: solarizedDarkColors.Foreground,
},
'hljs-title': {
color: solarizedDarkColors.Foreground,
},
'hljs-params': {
color: solarizedDarkColors.Foreground,
},
'hljs-formula': {
color: solarizedDarkColors.Foreground,
},
'hljs-comment': {
color: solarizedDarkColors.Comment,
fontStyle: 'italic',
},
'hljs-quote': {
color: solarizedDarkColors.Comment,
fontStyle: 'italic',
},
'hljs-doctag': {
color: solarizedDarkColors.Comment,
},
'hljs-meta': {
color: solarizedDarkColors.Gray,
},
'hljs-meta-keyword': {
color: solarizedDarkColors.Gray,
},
'hljs-tag': {
color: solarizedDarkColors.Gray,
},
'hljs-variable': {
color: solarizedDarkColors.AccentPurple,
},
'hljs-template-variable': {
color: solarizedDarkColors.AccentPurple,
},
'hljs-attr': {
color: solarizedDarkColors.LightBlue,
},
'hljs-attribute': {
color: solarizedDarkColors.LightBlue,
},
'hljs-builtin-name': {
color: solarizedDarkColors.LightBlue,
},
'hljs-section': {
color: solarizedDarkColors.AccentYellow,
},
'hljs-emphasis': {
fontStyle: 'italic',
},
'hljs-strong': {
fontWeight: 'bold',
},
'hljs-bullet': {
color: solarizedDarkColors.AccentYellow,
},
'hljs-selector-tag': {
color: solarizedDarkColors.AccentYellow,
},
'hljs-selector-id': {
color: solarizedDarkColors.AccentYellow,
},
'hljs-selector-class': {
color: solarizedDarkColors.AccentYellow,
},
'hljs-selector-attr': {
color: solarizedDarkColors.AccentYellow,
},
'hljs-selector-pseudo': {
color: solarizedDarkColors.AccentYellow,
},
'hljs-addition': {
backgroundColor: '#00382f',
display: 'inline-block',
width: '100%',
},
'hljs-deletion': {
backgroundColor: '#3d0115',
display: 'inline-block',
width: '100%',
},
},
solarizedDarkColors,
semanticColors,
);
@@ -0,0 +1,151 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { type ColorsTheme, Theme } from '../../theme.js';
import { lightSemanticColors } from '../../semantic-tokens.js';
const ansiLightColors: ColorsTheme = {
type: 'light',
Background: 'white',
Foreground: '',
LightBlue: 'blue',
AccentBlue: 'blue',
AccentPurple: 'purple',
AccentCyan: 'cyan',
AccentGreen: 'green',
AccentYellow: 'orange',
AccentRed: 'red',
DiffAdded: '#E5F2E5',
DiffRemoved: '#FFE5E5',
Comment: 'gray',
Gray: 'gray',
DarkGray: 'gray',
GradientColors: ['blue', 'green'],
};
export const ANSILight: Theme = new Theme(
'ANSI Light',
'light',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: 'white',
color: 'black',
},
'hljs-keyword': {
color: 'blue',
},
'hljs-literal': {
color: 'blue',
},
'hljs-symbol': {
color: 'blue',
},
'hljs-name': {
color: 'blue',
},
'hljs-link': {
color: 'blue',
},
'hljs-built_in': {
color: 'cyan',
},
'hljs-type': {
color: 'cyan',
},
'hljs-number': {
color: 'green',
},
'hljs-class': {
color: 'green',
},
'hljs-string': {
color: 'red',
},
'hljs-meta-string': {
color: 'red',
},
'hljs-regexp': {
color: 'magenta',
},
'hljs-template-tag': {
color: 'magenta',
},
'hljs-subst': {
color: 'black',
},
'hljs-function': {
color: 'black',
},
'hljs-title': {
color: 'black',
},
'hljs-params': {
color: 'black',
},
'hljs-formula': {
color: 'black',
},
'hljs-comment': {
color: 'gray',
},
'hljs-quote': {
color: 'gray',
},
'hljs-doctag': {
color: 'gray',
},
'hljs-meta': {
color: 'gray',
},
'hljs-meta-keyword': {
color: 'gray',
},
'hljs-tag': {
color: 'gray',
},
'hljs-variable': {
color: 'purple',
},
'hljs-template-variable': {
color: 'purple',
},
'hljs-attr': {
color: 'blue',
},
'hljs-attribute': {
color: 'blue',
},
'hljs-builtin-name': {
color: 'blue',
},
'hljs-section': {
color: 'orange',
},
'hljs-bullet': {
color: 'orange',
},
'hljs-selector-tag': {
color: 'orange',
},
'hljs-selector-id': {
color: 'orange',
},
'hljs-selector-class': {
color: 'orange',
},
'hljs-selector-attr': {
color: 'orange',
},
'hljs-selector-pseudo': {
color: 'orange',
},
},
ansiLightColors,
lightSemanticColors,
);
@@ -0,0 +1,139 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { type ColorsTheme, Theme } from '../../theme.js';
import { interpolateColor } from '../../color-utils.js';
const ayuLightColors: ColorsTheme = {
type: 'light',
Background: '#f8f9fa',
Foreground: '#5c6166',
LightBlue: '#55b4d4',
AccentBlue: '#399ee6',
AccentPurple: '#a37acc',
AccentCyan: '#4cbf99',
AccentGreen: '#86b300',
AccentYellow: '#f2ae49',
AccentRed: '#f07171',
DiffAdded: '#C6EAD8',
DiffRemoved: '#FFCCCC',
Comment: '#ABADB1',
Gray: '#a6aaaf',
DarkGray: interpolateColor('#a6aaaf', '#f8f9fa', 0.5),
GradientColors: ['#399ee6', '#86b300'],
};
export const AyuLight: Theme = new Theme(
'Ayu Light',
'light',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: ayuLightColors.Background,
color: ayuLightColors.Foreground,
},
'hljs-comment': {
color: ayuLightColors.Comment,
fontStyle: 'italic',
},
'hljs-quote': {
color: ayuLightColors.AccentCyan,
fontStyle: 'italic',
},
'hljs-string': {
color: ayuLightColors.AccentGreen,
},
'hljs-constant': {
color: ayuLightColors.AccentCyan,
},
'hljs-number': {
color: ayuLightColors.AccentPurple,
},
'hljs-keyword': {
color: ayuLightColors.AccentYellow,
},
'hljs-selector-tag': {
color: ayuLightColors.AccentYellow,
},
'hljs-attribute': {
color: ayuLightColors.AccentYellow,
},
'hljs-variable': {
color: ayuLightColors.Foreground,
},
'hljs-variable.language': {
color: ayuLightColors.LightBlue,
fontStyle: 'italic',
},
'hljs-title': {
color: ayuLightColors.AccentBlue,
},
'hljs-section': {
color: ayuLightColors.AccentGreen,
fontWeight: 'bold',
},
'hljs-type': {
color: ayuLightColors.LightBlue,
},
'hljs-class .hljs-title': {
color: ayuLightColors.AccentBlue,
},
'hljs-tag': {
color: ayuLightColors.LightBlue,
},
'hljs-name': {
color: ayuLightColors.AccentBlue,
},
'hljs-builtin-name': {
color: ayuLightColors.AccentYellow,
},
'hljs-meta': {
color: ayuLightColors.AccentYellow,
},
'hljs-symbol': {
color: ayuLightColors.AccentRed,
},
'hljs-bullet': {
color: ayuLightColors.AccentYellow,
},
'hljs-regexp': {
color: ayuLightColors.AccentCyan,
},
'hljs-link': {
color: ayuLightColors.LightBlue,
},
'hljs-deletion': {
color: ayuLightColors.AccentRed,
},
'hljs-addition': {
color: ayuLightColors.AccentGreen,
},
'hljs-emphasis': {
fontStyle: 'italic',
},
'hljs-strong': {
fontWeight: 'bold',
},
'hljs-literal': {
color: ayuLightColors.AccentCyan,
},
'hljs-built_in': {
color: ayuLightColors.AccentRed,
},
'hljs-doctag': {
color: ayuLightColors.AccentRed,
},
'hljs-template-variable': {
color: ayuLightColors.AccentCyan,
},
'hljs-selector-id': {
color: ayuLightColors.AccentRed,
},
},
ayuLightColors,
);
@@ -0,0 +1,106 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { lightTheme, Theme } from '../../theme.js';
export const DefaultLight: Theme = new Theme(
'Default Light',
'light',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: lightTheme.Background,
color: lightTheme.Foreground,
},
'hljs-comment': {
color: lightTheme.Comment,
},
'hljs-quote': {
color: lightTheme.Comment,
},
'hljs-variable': {
color: lightTheme.Foreground,
},
'hljs-keyword': {
color: lightTheme.AccentBlue,
},
'hljs-selector-tag': {
color: lightTheme.AccentBlue,
},
'hljs-built_in': {
color: lightTheme.AccentBlue,
},
'hljs-name': {
color: lightTheme.AccentBlue,
},
'hljs-tag': {
color: lightTheme.AccentBlue,
},
'hljs-string': {
color: lightTheme.AccentRed,
},
'hljs-title': {
color: lightTheme.AccentRed,
},
'hljs-section': {
color: lightTheme.AccentRed,
},
'hljs-attribute': {
color: lightTheme.AccentRed,
},
'hljs-literal': {
color: lightTheme.AccentRed,
},
'hljs-template-tag': {
color: lightTheme.AccentRed,
},
'hljs-template-variable': {
color: lightTheme.AccentRed,
},
'hljs-type': {
color: lightTheme.AccentRed,
},
'hljs-addition': {
color: lightTheme.AccentGreen,
},
'hljs-deletion': {
color: lightTheme.AccentRed,
},
'hljs-selector-attr': {
color: lightTheme.AccentCyan,
},
'hljs-selector-pseudo': {
color: lightTheme.AccentCyan,
},
'hljs-meta': {
color: lightTheme.AccentCyan,
},
'hljs-doctag': {
color: lightTheme.Gray,
},
'hljs-attr': {
color: lightTheme.AccentRed,
},
'hljs-symbol': {
color: lightTheme.AccentCyan,
},
'hljs-bullet': {
color: lightTheme.AccentCyan,
},
'hljs-link': {
color: lightTheme.AccentCyan,
},
'hljs-emphasis': {
fontStyle: 'italic',
},
'hljs-strong': {
fontWeight: 'bold',
},
},
lightTheme,
);
@@ -0,0 +1,150 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { type ColorsTheme, Theme } from '../../theme.js';
import { interpolateColor } from '../../color-utils.js';
const githubLightColors: ColorsTheme = {
type: 'light',
Background: '#f8f8f8',
Foreground: '#24292E',
LightBlue: '#0086b3',
AccentBlue: '#458',
AccentPurple: '#900',
AccentCyan: '#009926',
AccentGreen: '#008080',
AccentYellow: '#990073',
AccentRed: '#d14',
DiffAdded: '#C6EAD8',
DiffRemoved: '#FFCCCC',
Comment: '#998',
Gray: '#999',
DarkGray: interpolateColor('#999', '#f8f8f8', 0.5),
FocusColor: '#458', // AccentBlue for GitHub branding
GradientColors: ['#458', '#008080'],
};
export const GitHubLight: Theme = new Theme(
'GitHub Light',
'light',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
color: githubLightColors.Foreground,
background: githubLightColors.Background,
},
'hljs-comment': {
color: githubLightColors.Comment,
fontStyle: 'italic',
},
'hljs-quote': {
color: githubLightColors.Comment,
fontStyle: 'italic',
},
'hljs-keyword': {
color: githubLightColors.Foreground,
fontWeight: 'bold',
},
'hljs-selector-tag': {
color: githubLightColors.Foreground,
fontWeight: 'bold',
},
'hljs-subst': {
color: githubLightColors.Foreground,
fontWeight: 'normal',
},
'hljs-number': {
color: githubLightColors.AccentGreen,
},
'hljs-literal': {
color: githubLightColors.AccentGreen,
},
'hljs-variable': {
color: githubLightColors.AccentGreen,
},
'hljs-template-variable': {
color: githubLightColors.AccentGreen,
},
'hljs-tag .hljs-attr': {
color: githubLightColors.AccentGreen,
},
'hljs-string': {
color: githubLightColors.AccentRed,
},
'hljs-doctag': {
color: githubLightColors.AccentRed,
},
'hljs-title': {
color: githubLightColors.AccentPurple,
fontWeight: 'bold',
},
'hljs-section': {
color: githubLightColors.AccentPurple,
fontWeight: 'bold',
},
'hljs-selector-id': {
color: githubLightColors.AccentPurple,
fontWeight: 'bold',
},
'hljs-type': {
color: githubLightColors.AccentBlue,
fontWeight: 'bold',
},
'hljs-class .hljs-title': {
color: githubLightColors.AccentBlue,
fontWeight: 'bold',
},
'hljs-tag': {
color: githubLightColors.AccentBlue,
fontWeight: 'normal',
},
'hljs-name': {
color: githubLightColors.AccentBlue,
fontWeight: 'normal',
},
'hljs-attribute': {
color: githubLightColors.AccentBlue,
fontWeight: 'normal',
},
'hljs-regexp': {
color: githubLightColors.AccentCyan,
},
'hljs-link': {
color: githubLightColors.AccentCyan,
},
'hljs-symbol': {
color: githubLightColors.AccentYellow,
},
'hljs-bullet': {
color: githubLightColors.AccentYellow,
},
'hljs-built_in': {
color: githubLightColors.LightBlue,
},
'hljs-builtin-name': {
color: githubLightColors.LightBlue,
},
'hljs-meta': {
color: githubLightColors.Gray,
fontWeight: 'bold',
},
'hljs-deletion': {
background: '#fdd',
},
'hljs-addition': {
background: '#dfd',
},
'hljs-emphasis': {
fontStyle: 'italic',
},
'hljs-strong': {
fontWeight: 'bold',
},
},
githubLightColors,
);
@@ -0,0 +1,146 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { type ColorsTheme, Theme, lightTheme } from '../../theme.js';
import { interpolateColor } from '../../color-utils.js';
const googleCodeColors: ColorsTheme = {
type: 'light',
Background: 'white',
Foreground: '#444',
LightBlue: '#066',
AccentBlue: '#008',
AccentPurple: '#606',
AccentCyan: '#066',
AccentGreen: '#080',
AccentYellow: '#660',
AccentRed: '#800',
DiffAdded: '#C6EAD8',
DiffRemoved: '#FEDEDE',
Comment: '#5f6368',
Gray: lightTheme.Gray,
DarkGray: interpolateColor(lightTheme.Gray, '#ffffff', 0.5),
GradientColors: ['#066', '#606'],
};
export const GoogleCode: Theme = new Theme(
'Google Code',
'light',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: googleCodeColors.Background,
color: googleCodeColors.Foreground,
},
'hljs-comment': {
color: googleCodeColors.AccentRed,
},
'hljs-quote': {
color: googleCodeColors.AccentRed,
},
'hljs-keyword': {
color: googleCodeColors.AccentBlue,
},
'hljs-selector-tag': {
color: googleCodeColors.AccentBlue,
},
'hljs-section': {
color: googleCodeColors.AccentBlue,
},
'hljs-title': {
color: googleCodeColors.AccentPurple,
},
'hljs-name': {
color: googleCodeColors.AccentBlue,
},
'hljs-variable': {
color: googleCodeColors.AccentYellow,
},
'hljs-template-variable': {
color: googleCodeColors.AccentYellow,
},
'hljs-string': {
color: googleCodeColors.AccentGreen,
},
'hljs-selector-attr': {
color: googleCodeColors.AccentGreen,
},
'hljs-selector-pseudo': {
color: googleCodeColors.AccentGreen,
},
'hljs-regexp': {
color: googleCodeColors.AccentGreen,
},
'hljs-literal': {
color: googleCodeColors.AccentCyan,
},
'hljs-symbol': {
color: googleCodeColors.AccentCyan,
},
'hljs-bullet': {
color: googleCodeColors.AccentCyan,
},
'hljs-meta': {
color: googleCodeColors.AccentCyan,
},
'hljs-number': {
color: googleCodeColors.AccentCyan,
},
'hljs-link': {
color: googleCodeColors.AccentCyan,
},
'hljs-doctag': {
color: googleCodeColors.AccentPurple,
fontWeight: 'bold',
},
'hljs-type': {
color: googleCodeColors.AccentPurple,
},
'hljs-attr': {
color: googleCodeColors.AccentPurple,
},
'hljs-built_in': {
color: googleCodeColors.AccentPurple,
},
'hljs-builtin-name': {
color: googleCodeColors.AccentPurple,
},
'hljs-params': {
color: googleCodeColors.AccentPurple,
},
'hljs-attribute': {
color: googleCodeColors.Foreground,
},
'hljs-subst': {
color: googleCodeColors.Foreground,
},
'hljs-formula': {
backgroundColor: '#eee',
fontStyle: 'italic',
},
'hljs-selector-id': {
color: googleCodeColors.AccentYellow,
},
'hljs-selector-class': {
color: googleCodeColors.AccentYellow,
},
'hljs-addition': {
backgroundColor: '#baeeba',
},
'hljs-deletion': {
backgroundColor: '#ffc8bd',
},
'hljs-strong': {
fontWeight: 'bold',
},
'hljs-emphasis': {
fontStyle: 'italic',
},
},
googleCodeColors,
);
@@ -0,0 +1,207 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { type ColorsTheme, Theme, interpolateColor } from '../../theme.js';
import { type SemanticColors } from '../../semantic-tokens.js';
import { DEFAULT_SELECTION_OPACITY } from '../../../constants.js';
const solarizedLightColors: ColorsTheme = {
type: 'light',
Background: '#fdf6e3',
Foreground: '#657b83',
LightBlue: '#268bd2',
AccentBlue: '#268bd2',
AccentPurple: '#6c71c4',
AccentCyan: '#2aa198',
AccentGreen: '#859900',
AccentYellow: '#d0b000',
AccentRed: '#dc322f',
DiffAdded: '#859900',
DiffRemoved: '#dc322f',
Comment: '#93a1a1',
Gray: '#93a1a1',
DarkGray: '#eee8d5',
GradientColors: ['#268bd2', '#2aa198'],
};
const semanticColors: SemanticColors = {
text: {
primary: '#657b83',
secondary: '#93a1a1',
link: '#268bd2',
accent: '#268bd2',
response: '#657b83',
},
background: {
primary: '#fdf6e3',
message: '#eee8d5',
input: '#eee8d5',
focus: interpolateColor('#fdf6e3', '#859900', DEFAULT_SELECTION_OPACITY),
diff: {
added: '#d7f2d7',
removed: '#f2d7d7',
},
},
border: {
default: '#eee8d5',
},
ui: {
comment: '#93a1a1',
symbol: '#586e75',
active: '#268bd2',
dark: '#eee8d5',
focus: '#859900',
gradient: ['#268bd2', '#2aa198', '#859900'],
},
status: {
success: '#859900',
warning: '#d0b000',
error: '#dc322f',
},
};
export const SolarizedLight: Theme = new Theme(
'Solarized Light',
'light',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: solarizedLightColors.Background,
color: solarizedLightColors.Foreground,
},
'hljs-keyword': {
color: solarizedLightColors.AccentBlue,
},
'hljs-literal': {
color: solarizedLightColors.AccentBlue,
},
'hljs-symbol': {
color: solarizedLightColors.AccentBlue,
},
'hljs-name': {
color: solarizedLightColors.AccentBlue,
},
'hljs-link': {
color: solarizedLightColors.AccentBlue,
textDecoration: 'underline',
},
'hljs-built_in': {
color: solarizedLightColors.AccentCyan,
},
'hljs-type': {
color: solarizedLightColors.AccentCyan,
},
'hljs-number': {
color: solarizedLightColors.AccentGreen,
},
'hljs-class': {
color: solarizedLightColors.AccentGreen,
},
'hljs-string': {
color: solarizedLightColors.AccentYellow,
},
'hljs-meta-string': {
color: solarizedLightColors.AccentYellow,
},
'hljs-regexp': {
color: solarizedLightColors.AccentRed,
},
'hljs-template-tag': {
color: solarizedLightColors.AccentRed,
},
'hljs-subst': {
color: solarizedLightColors.Foreground,
},
'hljs-function': {
color: solarizedLightColors.Foreground,
},
'hljs-title': {
color: solarizedLightColors.Foreground,
},
'hljs-params': {
color: solarizedLightColors.Foreground,
},
'hljs-formula': {
color: solarizedLightColors.Foreground,
},
'hljs-comment': {
color: solarizedLightColors.Comment,
fontStyle: 'italic',
},
'hljs-quote': {
color: solarizedLightColors.Comment,
fontStyle: 'italic',
},
'hljs-doctag': {
color: solarizedLightColors.Comment,
},
'hljs-meta': {
color: solarizedLightColors.Gray,
},
'hljs-meta-keyword': {
color: solarizedLightColors.Gray,
},
'hljs-tag': {
color: solarizedLightColors.Gray,
},
'hljs-variable': {
color: solarizedLightColors.AccentPurple,
},
'hljs-template-variable': {
color: solarizedLightColors.AccentPurple,
},
'hljs-attr': {
color: solarizedLightColors.LightBlue,
},
'hljs-attribute': {
color: solarizedLightColors.LightBlue,
},
'hljs-builtin-name': {
color: solarizedLightColors.LightBlue,
},
'hljs-section': {
color: solarizedLightColors.AccentYellow,
},
'hljs-emphasis': {
fontStyle: 'italic',
},
'hljs-strong': {
fontWeight: 'bold',
},
'hljs-bullet': {
color: solarizedLightColors.AccentYellow,
},
'hljs-selector-tag': {
color: solarizedLightColors.AccentYellow,
},
'hljs-selector-id': {
color: solarizedLightColors.AccentYellow,
},
'hljs-selector-class': {
color: solarizedLightColors.AccentYellow,
},
'hljs-selector-attr': {
color: solarizedLightColors.AccentYellow,
},
'hljs-selector-pseudo': {
color: solarizedLightColors.AccentYellow,
},
'hljs-addition': {
backgroundColor: '#d7f2d7',
display: 'inline-block',
width: '100%',
},
'hljs-deletion': {
backgroundColor: '#f2d7d7',
display: 'inline-block',
width: '100%',
},
},
solarizedLightColors,
semanticColors,
);
@@ -0,0 +1,155 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import { type ColorsTheme, Theme } from '../../theme.js';
import { interpolateColor } from '../../color-utils.js';
const xcodeColors: ColorsTheme = {
type: 'light',
Background: '#fff',
Foreground: '#444',
LightBlue: '#0E0EFF',
AccentBlue: '#1c00cf',
AccentPurple: '#aa0d91',
AccentCyan: '#3F6E74',
AccentGreen: '#007400',
AccentYellow: '#836C28',
AccentRed: '#c41a16',
DiffAdded: '#C6EAD8',
DiffRemoved: '#FEDEDE',
Comment: '#007400',
Gray: '#c0c0c0',
DarkGray: interpolateColor('#c0c0c0', '#fff', 0.5),
FocusColor: '#1c00cf', // AccentBlue for more vibrance
GradientColors: ['#1c00cf', '#007400'],
};
export const XCode: Theme = new Theme(
'Xcode',
'light',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
background: xcodeColors.Background,
color: xcodeColors.Foreground,
},
'xml .hljs-meta': {
color: xcodeColors.Gray,
},
'hljs-comment': {
color: xcodeColors.Comment,
},
'hljs-quote': {
color: xcodeColors.Comment,
},
'hljs-tag': {
color: xcodeColors.AccentPurple,
},
'hljs-attribute': {
color: xcodeColors.AccentPurple,
},
'hljs-keyword': {
color: xcodeColors.AccentPurple,
},
'hljs-selector-tag': {
color: xcodeColors.AccentPurple,
},
'hljs-literal': {
color: xcodeColors.AccentPurple,
},
'hljs-name': {
color: xcodeColors.AccentPurple,
},
'hljs-variable': {
color: xcodeColors.AccentCyan,
},
'hljs-template-variable': {
color: xcodeColors.AccentCyan,
},
'hljs-code': {
color: xcodeColors.AccentRed,
},
'hljs-string': {
color: xcodeColors.AccentRed,
},
'hljs-meta-string': {
color: xcodeColors.AccentRed,
},
'hljs-regexp': {
color: xcodeColors.LightBlue,
},
'hljs-link': {
color: xcodeColors.LightBlue,
},
'hljs-title': {
color: xcodeColors.AccentBlue,
},
'hljs-symbol': {
color: xcodeColors.AccentBlue,
},
'hljs-bullet': {
color: xcodeColors.AccentBlue,
},
'hljs-number': {
color: xcodeColors.AccentBlue,
},
'hljs-section': {
color: xcodeColors.AccentYellow,
},
'hljs-meta': {
color: xcodeColors.AccentYellow,
},
'hljs-class .hljs-title': {
color: xcodeColors.AccentPurple,
},
'hljs-type': {
color: xcodeColors.AccentPurple,
},
'hljs-built_in': {
color: xcodeColors.AccentPurple,
},
'hljs-builtin-name': {
color: xcodeColors.AccentPurple,
},
'hljs-params': {
color: xcodeColors.AccentPurple,
},
'hljs-attr': {
color: xcodeColors.AccentYellow,
},
'hljs-subst': {
color: xcodeColors.Foreground,
},
'hljs-formula': {
backgroundColor: '#eee',
fontStyle: 'italic',
},
'hljs-addition': {
backgroundColor: '#baeeba',
},
'hljs-deletion': {
backgroundColor: '#ffc8bd',
},
'hljs-selector-id': {
color: xcodeColors.AccentYellow,
},
'hljs-selector-class': {
color: xcodeColors.AccentYellow,
},
'hljs-doctag': {
fontWeight: 'bold',
},
'hljs-strong': {
fontWeight: 'bold',
},
'hljs-emphasis': {
fontStyle: 'italic',
},
},
xcodeColors,
);
@@ -0,0 +1,136 @@
/**
* @license
* Copyright 2026 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import type { ColorsTheme } from '../theme.js';
import { Theme } from '../theme.js';
import type { SemanticColors } from '../semantic-tokens.js';
const noColorColorsTheme: ColorsTheme = {
type: 'ansi',
Background: '',
Foreground: '',
LightBlue: '',
AccentBlue: '',
AccentPurple: '',
AccentCyan: '',
AccentGreen: '',
AccentYellow: '',
AccentRed: '',
DiffAdded: '',
DiffRemoved: '',
Comment: '',
Gray: '',
DarkGray: '',
InputBackground: '',
MessageBackground: '',
FocusBackground: '',
};
const noColorSemanticColors: SemanticColors = {
text: {
primary: '',
secondary: '',
link: '',
accent: '',
response: '',
},
background: {
primary: '',
message: '',
input: '',
focus: '',
diff: {
added: '',
removed: '',
},
},
border: {
default: '',
},
ui: {
comment: '',
symbol: '',
active: '',
dark: '',
focus: '',
gradient: [],
},
status: {
error: '',
success: '',
warning: '',
},
};
export const NoColorTheme: Theme = new Theme(
'NoColor',
'dark',
{
hljs: {
display: 'block',
overflowX: 'auto',
padding: '0.5em',
},
'hljs-keyword': {},
'hljs-literal': {},
'hljs-symbol': {},
'hljs-name': {},
'hljs-link': {
textDecoration: 'underline',
},
'hljs-built_in': {},
'hljs-type': {},
'hljs-number': {},
'hljs-class': {},
'hljs-string': {},
'hljs-meta-string': {},
'hljs-regexp': {},
'hljs-template-tag': {},
'hljs-subst': {},
'hljs-function': {},
'hljs-title': {},
'hljs-params': {},
'hljs-formula': {},
'hljs-comment': {
fontStyle: 'italic',
},
'hljs-quote': {
fontStyle: 'italic',
},
'hljs-doctag': {},
'hljs-meta': {},
'hljs-meta-keyword': {},
'hljs-tag': {},
'hljs-variable': {},
'hljs-template-variable': {},
'hljs-attr': {},
'hljs-attribute': {},
'hljs-builtin-name': {},
'hljs-section': {},
'hljs-emphasis': {
fontStyle: 'italic',
},
'hljs-strong': {
fontWeight: 'bold',
},
'hljs-bullet': {},
'hljs-selector-tag': {},
'hljs-selector-id': {},
'hljs-selector-class': {},
'hljs-selector-attr': {},
'hljs-selector-pseudo': {},
'hljs-addition': {
display: 'inline-block',
width: '100%',
},
'hljs-deletion': {
display: 'inline-block',
width: '100%',
},
},
noColorColorsTheme,
noColorSemanticColors,
);