summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/themes/github-dark.ts
blob: 3fae630d3889d18d162e5520544b83ec1d556bb3 (plain)
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
/**
 * @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 githubDarkColors: ColorsTheme = {
  type: 'dark',
  Background: '#24292e',
  Foreground: '#d1d5da',
  LightBlue: '#79B8FF',
  AccentBlue: '#79B8FF',
  AccentPurple: '#B392F0',
  AccentCyan: '#9ECBFF',
  AccentGreen: '#85E89D',
  AccentYellow: '#FFAB70',
  AccentRed: '#F97583',
  DiffAdded: '#3C4636',
  DiffRemoved: '#502125',
  Comment: '#6A737D',
  Gray: '#6A737D',
  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,
  darkSemanticColors,
);