mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-14 05:42:54 -07:00
Add Solarized Dark and Solarized Light themes (#19064)
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
ddd28f6431
commit
b38e0984b9
@@ -0,0 +1,202 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2025 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { type ColorsTheme, Theme } from './theme.js';
|
||||
import { type SemanticColors } from './semantic-tokens.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',
|
||||
diff: {
|
||||
added: '#00382f',
|
||||
removed: '#3d0115',
|
||||
},
|
||||
},
|
||||
border: {
|
||||
default: '#073642',
|
||||
focused: '#586e75',
|
||||
},
|
||||
ui: {
|
||||
comment: '#586e75',
|
||||
symbol: '#93a1a1',
|
||||
dark: '#073642',
|
||||
gradient: ['#268bd2', '#2aa198'],
|
||||
},
|
||||
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,202 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright 2025 Google LLC
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
import { type ColorsTheme, Theme } from './theme.js';
|
||||
import { type SemanticColors } from './semantic-tokens.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',
|
||||
diff: {
|
||||
added: '#d7f2d7',
|
||||
removed: '#f2d7d7',
|
||||
},
|
||||
},
|
||||
border: {
|
||||
default: '#eee8d5',
|
||||
focused: '#93a1a1',
|
||||
},
|
||||
ui: {
|
||||
comment: '#93a1a1',
|
||||
symbol: '#586e75',
|
||||
dark: '#eee8d5',
|
||||
gradient: ['#268bd2', '#2aa198'],
|
||||
},
|
||||
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,
|
||||
);
|
||||
@@ -15,6 +15,8 @@ import { Holiday } from './holiday.js';
|
||||
import { DefaultLight } from './default-light.js';
|
||||
import { DefaultDark } from './default.js';
|
||||
import { ShadesOfPurple } from './shades-of-purple.js';
|
||||
import { SolarizedDark } from './solarized-dark.js';
|
||||
import { SolarizedLight } from './solarized-light.js';
|
||||
import { XCode } from './xcode.js';
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
@@ -68,6 +70,8 @@ class ThemeManager {
|
||||
GoogleCode,
|
||||
Holiday,
|
||||
ShadesOfPurple,
|
||||
SolarizedDark,
|
||||
SolarizedLight,
|
||||
XCode,
|
||||
ANSI,
|
||||
ANSILight,
|
||||
|
||||
Reference in New Issue
Block a user