dracula.go

  1package styles
  2
  3import "github.com/charmbracelet/glamour/v2/ansi"
  4
  5// DraculaStyleConfig is the dracula style.
  6var DraculaStyleConfig = ansi.StyleConfig{
  7	Document: ansi.StyleBlock{
  8		StylePrimitive: ansi.StylePrimitive{
  9			BlockPrefix: "\n",
 10			BlockSuffix: "\n",
 11			Color:       stringPtr("#f8f8f2"),
 12		},
 13		Margin: uintPtr(defaultMargin),
 14	},
 15	BlockQuote: ansi.StyleBlock{
 16		StylePrimitive: ansi.StylePrimitive{
 17			Color:  stringPtr("#f1fa8c"),
 18			Italic: boolPtr(true),
 19		},
 20		Indent: uintPtr(defaultMargin),
 21	},
 22	List: ansi.StyleList{
 23		LevelIndent: defaultMargin,
 24		StyleBlock: ansi.StyleBlock{
 25			StylePrimitive: ansi.StylePrimitive{
 26				Color: stringPtr("#f8f8f2"),
 27			},
 28		},
 29	},
 30	Heading: ansi.StyleBlock{
 31		StylePrimitive: ansi.StylePrimitive{
 32			BlockSuffix: "\n",
 33			Color:       stringPtr("#bd93f9"),
 34			Bold:        boolPtr(true),
 35		},
 36	},
 37	H1: ansi.StyleBlock{
 38		StylePrimitive: ansi.StylePrimitive{
 39			Prefix: "# ",
 40		},
 41	},
 42	H2: ansi.StyleBlock{
 43		StylePrimitive: ansi.StylePrimitive{
 44			Prefix: "## ",
 45		},
 46	},
 47	H3: ansi.StyleBlock{
 48		StylePrimitive: ansi.StylePrimitive{
 49			Prefix: "### ",
 50		},
 51	},
 52	H4: ansi.StyleBlock{
 53		StylePrimitive: ansi.StylePrimitive{
 54			Prefix: "#### ",
 55		},
 56	},
 57	H5: ansi.StyleBlock{
 58		StylePrimitive: ansi.StylePrimitive{
 59			Prefix: "##### ",
 60		},
 61	},
 62	H6: ansi.StyleBlock{
 63		StylePrimitive: ansi.StylePrimitive{
 64			Prefix: "###### ",
 65		},
 66	},
 67	Strikethrough: ansi.StylePrimitive{
 68		CrossedOut: boolPtr(true),
 69	},
 70	Emph: ansi.StylePrimitive{
 71		Color:  stringPtr("#f1fa8c"),
 72		Italic: boolPtr(true),
 73	},
 74	Strong: ansi.StylePrimitive{
 75		Bold:  boolPtr(true),
 76		Color: stringPtr("#ffb86c"),
 77	},
 78	HorizontalRule: ansi.StylePrimitive{
 79		Color:  stringPtr("#6272A4"),
 80		Format: "\n--------\n",
 81	},
 82	Item: ansi.StylePrimitive{
 83		BlockPrefix: "• ",
 84	},
 85	Enumeration: ansi.StylePrimitive{
 86		BlockPrefix: ". ",
 87		Color:       stringPtr("#8be9fd"),
 88	},
 89	Task: ansi.StyleTask{
 90		StylePrimitive: ansi.StylePrimitive{},
 91		Ticked:         "[āœ“] ",
 92		Unticked:       "[ ] ",
 93	},
 94	Link: ansi.StylePrimitive{
 95		Color:     stringPtr("#8be9fd"),
 96		Underline: boolPtr(true),
 97	},
 98	LinkText: ansi.StylePrimitive{
 99		Color: stringPtr("#ff79c6"),
100	},
101	Image: ansi.StylePrimitive{
102		Color:     stringPtr("#8be9fd"),
103		Underline: boolPtr(true),
104	},
105	ImageText: ansi.StylePrimitive{
106		Color:  stringPtr("#ff79c6"),
107		Format: "Image: {{.text}} →",
108	},
109	Code: ansi.StyleBlock{
110		StylePrimitive: ansi.StylePrimitive{
111			Color: stringPtr("#50fa7b"),
112		},
113	},
114	CodeBlock: ansi.StyleCodeBlock{
115		StyleBlock: ansi.StyleBlock{
116			StylePrimitive: ansi.StylePrimitive{
117				Color: stringPtr("#ffb86c"),
118			},
119			Margin: uintPtr(defaultMargin),
120		},
121		Chroma: &ansi.Chroma{
122			Text: ansi.StylePrimitive{
123				Color: stringPtr("#f8f8f2"),
124			},
125			Error: ansi.StylePrimitive{
126				Color:           stringPtr("#f8f8f2"),
127				BackgroundColor: stringPtr("#ff5555"),
128			},
129			Comment: ansi.StylePrimitive{
130				Color: stringPtr("#6272A4"),
131			},
132			CommentPreproc: ansi.StylePrimitive{
133				Color: stringPtr("#ff79c6"),
134			},
135			Keyword: ansi.StylePrimitive{
136				Color: stringPtr("#ff79c6"),
137			},
138			KeywordReserved: ansi.StylePrimitive{
139				Color: stringPtr("#ff79c6"),
140			},
141			KeywordNamespace: ansi.StylePrimitive{
142				Color: stringPtr("#ff79c6"),
143			},
144			KeywordType: ansi.StylePrimitive{
145				Color: stringPtr("#8be9fd"),
146			},
147			Operator: ansi.StylePrimitive{
148				Color: stringPtr("#ff79c6"),
149			},
150			Punctuation: ansi.StylePrimitive{
151				Color: stringPtr("#f8f8f2"),
152			},
153			Name: ansi.StylePrimitive{
154				Color: stringPtr("#8be9fd"),
155			},
156			NameBuiltin: ansi.StylePrimitive{
157				Color: stringPtr("#8be9fd"),
158			},
159			NameTag: ansi.StylePrimitive{
160				Color: stringPtr("#ff79c6"),
161			},
162			NameAttribute: ansi.StylePrimitive{
163				Color: stringPtr("#50fa7b"),
164			},
165			NameClass: ansi.StylePrimitive{
166				Color: stringPtr("#8be9fd"),
167			},
168			NameConstant: ansi.StylePrimitive{
169				Color: stringPtr("#bd93f9"),
170			},
171			NameDecorator: ansi.StylePrimitive{
172				Color: stringPtr("#50fa7b"),
173			},
174			NameFunction: ansi.StylePrimitive{
175				Color: stringPtr("#50fa7b"),
176			},
177			LiteralNumber: ansi.StylePrimitive{
178				Color: stringPtr("#6EEFC0"),
179			},
180			LiteralString: ansi.StylePrimitive{
181				Color: stringPtr("#f1fa8c"),
182			},
183			LiteralStringEscape: ansi.StylePrimitive{
184				Color: stringPtr("#ff79c6"),
185			},
186			GenericDeleted: ansi.StylePrimitive{
187				Color: stringPtr("#ff5555"),
188			},
189			GenericEmph: ansi.StylePrimitive{
190				Color:  stringPtr("#f1fa8c"),
191				Italic: boolPtr(true),
192			},
193			GenericInserted: ansi.StylePrimitive{
194				Color: stringPtr("#50fa7b"),
195			},
196			GenericStrong: ansi.StylePrimitive{
197				Color: stringPtr("#ffb86c"),
198				Bold:  boolPtr(true),
199			},
200			GenericSubheading: ansi.StylePrimitive{
201				Color: stringPtr("#bd93f9"),
202			},
203			Background: ansi.StylePrimitive{
204				BackgroundColor: stringPtr("#282a36"),
205			},
206		},
207	},
208	Table: ansi.StyleTable{
209		StyleBlock: ansi.StyleBlock{
210			StylePrimitive: ansi.StylePrimitive{},
211		},
212	},
213	DefinitionDescription: ansi.StylePrimitive{
214		BlockPrefix: "\n🠶 ",
215	},
216}