Skip to content

Commit 1b77bf4

Browse files
krsntnkitten
andcommitted
Update github.js (#100)
more closer match to github theme Co-authored-by: Phil Pluckthun <phil@kitten.sh>
1 parent 8ddafda commit 1b77bf4

File tree

1 file changed

+120
-30
lines changed

1 file changed

+120
-30
lines changed

src/themes/github.js

Lines changed: 120 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,168 @@
11
// @flow
2-
// Original: https://raw.githubusercontent.com/PrismJS/prism-themes/master/themes/prism-ghcolors.css
32

43
import type { PrismTheme } from "../types";
54

65
var theme: PrismTheme = {
76
plain: {
8-
color: "#393A34",
7+
color: "rgb(36, 41, 46)",
98
backgroundColor: "#f6f8fa",
109
},
1110
styles: [
1211
{
13-
types: ["comment", "prolog", "doctype", "cdata"],
12+
types: ["prolog"],
1413
style: {
15-
color: "#999988",
16-
fontStyle: "italic",
14+
color: "rgb(0, 0, 128)",
1715
},
1816
},
1917
{
20-
types: ["namespace"],
18+
types: ["comment"],
2119
style: {
22-
opacity: 0.7,
20+
color: "rgb(106, 153, 85)",
2321
},
2422
},
2523
{
26-
types: ["string", "attr-value"],
24+
types: ["builtin", "changed", "keyword"],
2725
style: {
26+
color: "rgb(215, 58, 73)",
2827
color: "#e3116c",
2928
},
3029
},
30+
{
31+
types: ["inserted-sign", "inserted"],
32+
style: {
33+
backgroundColor: "rgb(240, 255, 244)",
34+
color: "rgb(34, 134, 58)",
35+
},
36+
},
37+
{
38+
types: ["constant"],
39+
style: {
40+
color: "rgb(100, 102, 149)",
41+
},
42+
},
43+
{
44+
types: ["attr-name", "variable"],
45+
style: {
46+
color: "rgb(156, 220, 254)",
47+
},
48+
},
49+
{
50+
types: ["deleted-sign", "deleted"],
51+
style: {
52+
backgroundColor: "rgb(255, 238, 240)",
53+
color: "rgb(179, 29, 40)",
54+
},
55+
},
56+
{
57+
types: ["selector"],
58+
style: {
59+
color: "rgb(215, 186, 125)",
60+
},
61+
},
62+
{
63+
// Fix tag color
64+
types: ["tag"],
65+
style: {
66+
color: "rgb(78, 201, 176)",
67+
},
68+
},
69+
{
70+
// Fix tag color for HTML
71+
types: ["tag"],
72+
languages: ["markup"],
73+
style: {
74+
color: "rgb(86, 156, 214)",
75+
},
76+
},
3177
{
3278
types: ["punctuation", "operator"],
3379
style: {
34-
color: "#393A34",
80+
color: "rgb(36, 41, 46)",
81+
},
82+
},
83+
{
84+
types: ["operator"],
85+
style: {
86+
color: "rgb(0, 92, 197)",
87+
},
88+
},
89+
{
90+
types: ["boolean"],
91+
style: {
92+
color: "rgb(0, 92, 197)",
93+
},
94+
},
95+
{
96+
// Fix punctuation color for HTML
97+
types: ["punctuation"],
98+
languages: ["markup"],
99+
style: {
100+
color: "#808080",
101+
},
102+
},
103+
{
104+
types: ["function"],
105+
style: {
106+
color: "rgb(111, 66, 193)",
107+
},
108+
},
109+
{
110+
types: ["class-name"],
111+
style: {
112+
color: "rgb(78, 201, 176)",
113+
},
114+
},
115+
{
116+
types: ["known-class-name", "class-name"],
117+
style: {
118+
color: "rgb(227, 98, 9)",
119+
},
120+
},
121+
{
122+
types: ["char"],
123+
style: {
124+
color: "rgb(209, 105, 105)",
125+
},
126+
},
127+
{
128+
types: ["property-access"],
129+
style: {
130+
color: "rgb(0, 92, 197)",
35131
},
36132
},
37133
{
38-
types: [
39-
"entity",
40-
"url",
41-
"symbol",
42-
"number",
43-
"boolean",
44-
"variable",
45-
"constant",
46-
"property",
47-
"regex",
48-
"inserted",
49-
],
134+
types: ["method", "function", "property-access"],
50135
style: {
51-
color: "#36acaa",
136+
color: "rgb(111, 66, 193)",
52137
},
53138
},
54139
{
55-
types: ["atrule", "keyword", "attr-name", "selector"],
140+
languages: ["json"],
141+
types: ["property"],
56142
style: {
57-
color: "#00a4db",
143+
color: "rgb(3, 47, 98)",
58144
},
59145
},
60146
{
61-
types: ["function", "deleted", "tag"],
147+
languages: ["json"],
148+
types: ["string"],
62149
style: {
63-
color: "#d73a49",
150+
color: "rgb(3, 47, 98)",
64151
},
65152
},
66153
{
67-
types: ["function-variable"],
154+
languages: ["json"],
155+
types: ["number"],
68156
style: {
69-
color: "#6f42c1",
157+
color: "rgb(0, 92, 197)",
70158
},
71159
},
72160
{
73-
types: ["tag", "selector", "keyword"],
161+
languages: ["json"],
162+
types: ["comment"],
74163
style: {
75-
color: "#00009f",
164+
backgroundColor: "rgb(179, 29, 40)",
165+
color: "rgb(250, 251, 252)",
76166
},
77167
},
78168
],

0 commit comments

Comments
 (0)