Skip to content

Commit 5a7f19a

Browse files
Merge pull request #192 from ryanmogk/master
added-2-new-themes-used-for-jettwave.com
2 parents 62d4701 + 1ad7962 commit 5a7f19a

File tree

4 files changed

+220
-0
lines changed

4 files changed

+220
-0
lines changed

.changeset/tall-terms-press.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"prism-react-renderer": minor
3+
---
4+
5+
Added 2 new styles for the code viewer. light & dark mode themes using only
6+
colors found on tailwindCSS.

packages/prism-react-renderer/src/themes/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ export { default as synthwave84 } from "./synthwave84"
1212
export { default as ultramin } from "./ultramin"
1313
export { default as vsDark } from "./vsDark"
1414
export { default as vsLight } from "./vsLight"
15+
export { default as jettwaveDark } from "./jettwaveDark"
16+
export { default as jettwaveLight } from "./jettwaveLight"
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
//
2+
// dark version of code viewer styles built for https://jettwave.com
3+
// only uses colors found in default tailwindCSS => https://tailwindcss.com/docs/customizing-colors
4+
// designed by: https://github.com/ryanmogk
5+
//
6+
import type { PrismTheme } from "../types"
7+
const theme: PrismTheme = {
8+
plain: {
9+
color: "#f8fafc",
10+
backgroundColor: "#011627",
11+
},
12+
styles: [
13+
{
14+
types: ["prolog"],
15+
style: {
16+
color: "#000080",
17+
},
18+
},
19+
{
20+
types: ["comment"],
21+
style: {
22+
color: "#6A9955",
23+
},
24+
},
25+
{
26+
types: ["builtin", "changed", "keyword", "interpolation-punctuation"],
27+
style: {
28+
color: "#569CD6",
29+
},
30+
},
31+
{
32+
types: ["number", "inserted"],
33+
style: {
34+
color: "#B5CEA8",
35+
},
36+
},
37+
{
38+
types: ["constant"],
39+
style: {
40+
color: "#f8fafc",
41+
},
42+
},
43+
{
44+
types: ["attr-name", "variable"],
45+
style: {
46+
color: "#9CDCFE",
47+
},
48+
},
49+
{
50+
types: ["deleted", "string", "attr-value", "template-punctuation"],
51+
style: {
52+
color: "#cbd5e1",
53+
},
54+
},
55+
{
56+
types: ["selector"],
57+
style: {
58+
color: "#D7BA7D",
59+
},
60+
},
61+
{
62+
types: ["tag"],
63+
style: {
64+
color: "#0ea5e9",
65+
},
66+
},
67+
{
68+
types: ["tag"],
69+
languages: ["markup"],
70+
style: {
71+
color: "#0ea5e9",
72+
},
73+
},
74+
{
75+
types: ["punctuation", "operator"],
76+
style: {
77+
color: "#D4D4D4",
78+
},
79+
},
80+
{
81+
types: ["punctuation"],
82+
languages: ["markup"],
83+
style: {
84+
color: "#808080",
85+
},
86+
},
87+
{
88+
types: ["function"],
89+
style: {
90+
color: "#7dd3fc",
91+
},
92+
},
93+
{
94+
types: ["class-name"],
95+
style: {
96+
color: "#0ea5e9",
97+
},
98+
},
99+
{
100+
types: ["char"],
101+
style: {
102+
color: "#D16969",
103+
},
104+
},
105+
],
106+
}
107+
export default theme
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
// light version of code viewer styles built for https://jettwave.com
2+
// only uses colors found in default tailwindCSS => https://tailwindcss.com/docs/customizing-colors
3+
// designed by: https://github.com/ryanmogk
4+
import type { PrismTheme } from "../types"
5+
const theme: PrismTheme = {
6+
plain: {
7+
color: "#0f172a",
8+
backgroundColor: "#f1f5f9",
9+
},
10+
styles: [
11+
{
12+
types: ["prolog"],
13+
style: {
14+
color: "#000080",
15+
},
16+
},
17+
{
18+
types: ["comment"],
19+
style: {
20+
color: "#6A9955",
21+
},
22+
},
23+
{
24+
types: ["builtin", "changed", "keyword", "interpolation-punctuation"],
25+
style: {
26+
color: "#0c4a6e",
27+
},
28+
},
29+
{
30+
types: ["number", "inserted"],
31+
style: {
32+
color: "#B5CEA8",
33+
},
34+
},
35+
{
36+
types: ["constant"],
37+
style: {
38+
color: "#0f172a",
39+
},
40+
},
41+
{
42+
types: ["attr-name", "variable"],
43+
style: {
44+
color: "#0c4a6e",
45+
},
46+
},
47+
{
48+
types: ["deleted", "string", "attr-value", "template-punctuation"],
49+
style: {
50+
color: "#64748b",
51+
},
52+
},
53+
{
54+
types: ["selector"],
55+
style: {
56+
color: "#D7BA7D",
57+
},
58+
},
59+
{
60+
types: ["tag"],
61+
style: {
62+
color: "#0ea5e9",
63+
},
64+
},
65+
{
66+
types: ["tag"],
67+
languages: ["markup"],
68+
style: {
69+
color: "#0ea5e9",
70+
},
71+
},
72+
{
73+
types: ["punctuation", "operator"],
74+
style: {
75+
color: "#475569",
76+
},
77+
},
78+
{
79+
types: ["punctuation"],
80+
languages: ["markup"],
81+
style: {
82+
color: "#808080",
83+
},
84+
},
85+
{
86+
types: ["function"],
87+
style: {
88+
color: "#0e7490",
89+
},
90+
},
91+
{
92+
types: ["class-name"],
93+
style: {
94+
color: "#0ea5e9",
95+
},
96+
},
97+
{
98+
types: ["char"],
99+
style: {
100+
color: "#D16969",
101+
},
102+
},
103+
],
104+
}
105+
export default theme

0 commit comments

Comments
 (0)