1package styles
 2
 3import (
 4	"github.com/alecthomas/chroma/v2"
 5)
 6
 7var (
 8	// colors and palettes based on https://www.nordtheme.com/docs/colors-and-palettes
 9	nord0  = "#2e3440"
10	nord1  = "#3b4252" // nolint
11	nord2  = "#434c5e" // nolint
12	nord3  = "#4c566a"
13	nord3b = "#616e87"
14
15	nord4 = "#d8dee9"
16	nord5 = "#e5e9f0" // nolint
17	nord6 = "#eceff4"
18
19	nord7  = "#8fbcbb"
20	nord8  = "#88c0d0"
21	nord9  = "#81a1c1"
22	nord10 = "#5e81ac"
23
24	nord11 = "#bf616a"
25	nord12 = "#d08770"
26	nord13 = "#ebcb8b"
27	nord14 = "#a3be8c"
28	nord15 = "#b48ead"
29)
30
31// Nord, an arctic, north-bluish color palette
32var Nord = Register(chroma.MustNewStyle("nord", chroma.StyleEntries{
33	chroma.TextWhitespace:        nord4,
34	chroma.Comment:               "italic " + nord3b,
35	chroma.CommentPreproc:        nord10,
36	chroma.Keyword:               "bold " + nord9,
37	chroma.KeywordPseudo:         "nobold " + nord9,
38	chroma.KeywordType:           "nobold " + nord9,
39	chroma.Operator:              nord9,
40	chroma.OperatorWord:          "bold " + nord9,
41	chroma.Name:                  nord4,
42	chroma.NameBuiltin:           nord9,
43	chroma.NameFunction:          nord8,
44	chroma.NameClass:             nord7,
45	chroma.NameNamespace:         nord7,
46	chroma.NameException:         nord11,
47	chroma.NameVariable:          nord4,
48	chroma.NameConstant:          nord7,
49	chroma.NameLabel:             nord7,
50	chroma.NameEntity:            nord12,
51	chroma.NameAttribute:         nord7,
52	chroma.NameTag:               nord9,
53	chroma.NameDecorator:         nord12,
54	chroma.Punctuation:           nord6,
55	chroma.LiteralString:         nord14,
56	chroma.LiteralStringDoc:      nord3b,
57	chroma.LiteralStringInterpol: nord14,
58	chroma.LiteralStringEscape:   nord13,
59	chroma.LiteralStringRegex:    nord13,
60	chroma.LiteralStringSymbol:   nord14,
61	chroma.LiteralStringOther:    nord14,
62	chroma.LiteralNumber:         nord15,
63	chroma.GenericHeading:        "bold " + nord8,
64	chroma.GenericSubheading:     "bold " + nord8,
65	chroma.GenericDeleted:        nord11,
66	chroma.GenericInserted:       nord14,
67	chroma.GenericError:          nord11,
68	chroma.GenericEmph:           "italic",
69	chroma.GenericStrong:         "bold",
70	chroma.GenericPrompt:         "bold " + nord3,
71	chroma.GenericOutput:         nord4,
72	chroma.GenericTraceback:      nord11,
73	chroma.Error:                 nord11,
74	chroma.Background:            nord4 + " bg:" + nord0,
75}))