1"""
2 pygments.styles.monokai
3 ~~~~~~~~~~~~~~~~~~~~~~~
4
5 Mimic the Monokai color scheme. Based on tango.py.
6
7 http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/
8
9 :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
10 :license: BSD, see LICENSE for details.
11"""
12
13from pygments.style import Style
14from pygments.token import Keyword, Name, Comment, String, Error, Token, \
15 Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
16
17
18__all__ = ['MonokaiStyle']
19
20
21class MonokaiStyle(Style):
22 """
23 This style mimics the Monokai color scheme.
24 """
25 name = 'monokai'
26
27 background_color = "#272822"
28 highlight_color = "#49483e"
29
30 styles = {
31 # No corresponding class for the following:
32 Token: "#f8f8f2", # class: ''
33 Whitespace: "", # class: 'w'
34 Error: "#ed007e bg:#1e0010", # class: 'err'
35 Other: "", # class 'x'
36
37 Comment: "#959077", # class: 'c'
38 Comment.Multiline: "", # class: 'cm'
39 Comment.Preproc: "", # class: 'cp'
40 Comment.Single: "", # class: 'c1'
41 Comment.Special: "", # class: 'cs'
42
43 Keyword: "#66d9ef", # class: 'k'
44 Keyword.Constant: "", # class: 'kc'
45 Keyword.Declaration: "", # class: 'kd'
46 Keyword.Namespace: "#ff4689", # class: 'kn'
47 Keyword.Pseudo: "", # class: 'kp'
48 Keyword.Reserved: "", # class: 'kr'
49 Keyword.Type: "", # class: 'kt'
50
51 Operator: "#ff4689", # class: 'o'
52 Operator.Word: "", # class: 'ow' - like keywords
53
54 Punctuation: "#f8f8f2", # class: 'p'
55
56 Name: "#f8f8f2", # class: 'n'
57 Name.Attribute: "#a6e22e", # class: 'na' - to be revised
58 Name.Builtin: "", # class: 'nb'
59 Name.Builtin.Pseudo: "", # class: 'bp'
60 Name.Class: "#a6e22e", # class: 'nc' - to be revised
61 Name.Constant: "#66d9ef", # class: 'no' - to be revised
62 Name.Decorator: "#a6e22e", # class: 'nd' - to be revised
63 Name.Entity: "", # class: 'ni'
64 Name.Exception: "#a6e22e", # class: 'ne'
65 Name.Function: "#a6e22e", # class: 'nf'
66 Name.Property: "", # class: 'py'
67 Name.Label: "", # class: 'nl'
68 Name.Namespace: "", # class: 'nn' - to be revised
69 Name.Other: "#a6e22e", # class: 'nx'
70 Name.Tag: "#ff4689", # class: 'nt' - like a keyword
71 Name.Variable: "", # class: 'nv' - to be revised
72 Name.Variable.Class: "", # class: 'vc' - to be revised
73 Name.Variable.Global: "", # class: 'vg' - to be revised
74 Name.Variable.Instance: "", # class: 'vi' - to be revised
75
76 Number: "#ae81ff", # class: 'm'
77 Number.Float: "", # class: 'mf'
78 Number.Hex: "", # class: 'mh'
79 Number.Integer: "", # class: 'mi'
80 Number.Integer.Long: "", # class: 'il'
81 Number.Oct: "", # class: 'mo'
82
83 Literal: "#ae81ff", # class: 'l'
84 Literal.Date: "#e6db74", # class: 'ld'
85
86 String: "#e6db74", # class: 's'
87 String.Backtick: "", # class: 'sb'
88 String.Char: "", # class: 'sc'
89 String.Doc: "", # class: 'sd' - like a comment
90 String.Double: "", # class: 's2'
91 String.Escape: "#ae81ff", # class: 'se'
92 String.Heredoc: "", # class: 'sh'
93 String.Interpol: "", # class: 'si'
94 String.Other: "", # class: 'sx'
95 String.Regex: "", # class: 'sr'
96 String.Single: "", # class: 's1'
97 String.Symbol: "", # class: 'ss'
98
99
100 Generic: "", # class: 'g'
101 Generic.Deleted: "#ff4689", # class: 'gd',
102 Generic.Emph: "italic", # class: 'ge'
103 Generic.Error: "", # class: 'gr'
104 Generic.Heading: "", # class: 'gh'
105 Generic.Inserted: "#a6e22e", # class: 'gi'
106 Generic.Output: "#66d9ef", # class: 'go'
107 Generic.Prompt: "bold #ff4689", # class: 'gp'
108 Generic.Strong: "bold", # class: 'gs'
109 Generic.EmphStrong: "bold italic", # class: 'ges'
110 Generic.Subheading: "#959077", # class: 'gu'
111 Generic.Traceback: "", # class: 'gt'
112 }