chore: added darkmatter theme to web server in sipp e31ce585
Steve · 2026-05-22 19:42 2 file(s) · +90 −1
apps/sipp/server/server.go +1 −1
74 74
	if lexer == nil {
75 75
		lexer = lexers.Fallback
76 76
	}
77 -
	style := styles.Get("evergarden")
77 +
	style := styles.Get("darkmatter")
78 78
	if style == nil {
79 79
		style = styles.Fallback
80 80
	}
apps/sipp/server/theme.go (added) +89 −0
1 +
package server
2 +
3 +
import (
4 +
	"github.com/alecthomas/chroma/v2"
5 +
	"github.com/alecthomas/chroma/v2/styles"
6 +
)
7 +
8 +
// Darkmatter chroma style — base16 template filled with the "Darkmatter" scheme.
9 +
//
10 +
//	base00 #121113  base01 #121212  base02 #222222  base03 #333333
11 +
//	base04 #999999  base05 #c1c1c1  base06 #999999  base07 #c1c1c1
12 +
//	base08 #5f8787  base09 #aaaaaa  base0A #e78a53  base0B #fbcb97
13 +
//	base0C #aaaaaa  base0D #888888  base0E #999999  base0F #444444
14 +
func init() {
15 +
	styles.Register(chroma.MustNewStyle("darkmatter", chroma.StyleEntries{
16 +
		chroma.Other:                    "#c1c1c1",
17 +
		chroma.Error:                    "#5f8787",
18 +
		chroma.Background:               "bg:#121113",
19 +
		chroma.Keyword:                  "#999999",
20 +
		chroma.KeywordConstant:          "#999999",
21 +
		chroma.KeywordDeclaration:       "#5f8787",
22 +
		chroma.KeywordNamespace:         "#999999",
23 +
		chroma.KeywordPseudo:            "#999999",
24 +
		chroma.KeywordReserved:          "#999999",
25 +
		chroma.KeywordType:              "#aaaaaa",
26 +
		chroma.Name:                     "#c1c1c1",
27 +
		chroma.NameAttribute:            "#888888",
28 +
		chroma.NameBuiltin:              "#5f8787",
29 +
		chroma.NameBuiltinPseudo:        "#c1c1c1",
30 +
		chroma.NameClass:                "#e78a53",
31 +
		chroma.NameConstant:             "#aaaaaa",
32 +
		chroma.NameDecorator:            "#aaaaaa",
33 +
		chroma.NameEntity:               "#c1c1c1",
34 +
		chroma.NameException:            "#c1c1c1",
35 +
		chroma.NameFunction:             "#888888",
36 +
		chroma.NameLabel:                "#5f8787",
37 +
		chroma.NameNamespace:            "#c1c1c1",
38 +
		chroma.NameOther:                "#c1c1c1",
39 +
		chroma.NameTag:                  "#999999",
40 +
		chroma.NameVariable:             "#5f8787",
41 +
		chroma.NameVariableClass:        "#5f8787",
42 +
		chroma.NameVariableGlobal:       "#5f8787",
43 +
		chroma.NameVariableInstance:     "#5f8787",
44 +
		chroma.Literal:                  "#c1c1c1",
45 +
		chroma.LiteralDate:              "#c1c1c1",
46 +
		chroma.LiteralString:            "#fbcb97",
47 +
		chroma.LiteralStringBacktick:    "#fbcb97",
48 +
		chroma.LiteralStringChar:        "#fbcb97",
49 +
		chroma.LiteralStringDoc:         "#fbcb97",
50 +
		chroma.LiteralStringDouble:      "#fbcb97",
51 +
		chroma.LiteralStringEscape:      "#fbcb97",
52 +
		chroma.LiteralStringHeredoc:     "#fbcb97",
53 +
		chroma.LiteralStringInterpol:    "#fbcb97",
54 +
		chroma.LiteralStringOther:       "#fbcb97",
55 +
		chroma.LiteralStringRegex:       "#fbcb97",
56 +
		chroma.LiteralStringSingle:      "#fbcb97",
57 +
		chroma.LiteralStringSymbol:      "#fbcb97",
58 +
		chroma.LiteralNumber:            "#aaaaaa",
59 +
		chroma.LiteralNumberBin:         "#aaaaaa",
60 +
		chroma.LiteralNumberFloat:       "#aaaaaa",
61 +
		chroma.LiteralNumberHex:         "#aaaaaa",
62 +
		chroma.LiteralNumberInteger:     "#aaaaaa",
63 +
		chroma.LiteralNumberIntegerLong: "#aaaaaa",
64 +
		chroma.LiteralNumberOct:         "#aaaaaa",
65 +
		chroma.Operator:                 "#999999",
66 +
		chroma.OperatorWord:             "#999999",
67 +
		chroma.Punctuation:              "#c1c1c1",
68 +
		chroma.Comment:                  "#333333",
69 +
		chroma.CommentHashbang:          "#333333",
70 +
		chroma.CommentMultiline:         "#333333",
71 +
		chroma.CommentSingle:            "#333333",
72 +
		chroma.CommentSpecial:           "#333333",
73 +
		chroma.CommentPreproc:           "#333333",
74 +
		chroma.Generic:                  "#c1c1c1",
75 +
		chroma.GenericDeleted:           "#5f8787",
76 +
		chroma.GenericEmph:              "underline #c1c1c1",
77 +
		chroma.GenericError:             "#5f8787",
78 +
		chroma.GenericHeading:           "bold #c1c1c1",
79 +
		chroma.GenericInserted:          "bold #c1c1c1",
80 +
		chroma.GenericOutput:            "#222222",
81 +
		chroma.GenericPrompt:            "#c1c1c1",
82 +
		chroma.GenericStrong:            "italic #c1c1c1",
83 +
		chroma.GenericSubheading:        "bold #c1c1c1",
84 +
		chroma.GenericTraceback:         "#c1c1c1",
85 +
		chroma.GenericUnderline:         "underline",
86 +
		chroma.Text:                     "#c1c1c1",
87 +
		chroma.TextWhitespace:           "#c1c1c1",
88 +
	}))
89 +
}