github.com/charmbracelet/glamour@v0.7.0/dracula.go (about)

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