-
Notifications
You must be signed in to change notification settings - Fork 4
/
style.py
105 lines (98 loc) · 4.21 KB
/
style.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
from pygments.style import Style
from pygments.token import (
Comment,
Error,
Generic,
Keyword,
Literal,
Name,
Number,
Operator,
Other,
Punctuation,
String,
Text,
)
class Colors:
comment = "#ffd900"
red = "#ffa07a"
orange = "#ffd900"
yellow = "#ffd900"
green = "#abe338"
blue = "#00e0e0"
purple = "#dcc6e0"
black = "#f8f8f2"
class Theme(Style):
"""
This style mimics the a11 light theme from eric bailey's accessible themes.
"""
default_style = ""
background_color = "#2b2b2b"
highlight_color = "#ffd9002e"
styles = {
Text: Colors.black, # class: ''
Error: Colors.red, # class: 'err'
Other: "", # class 'x'
Comment: Colors.comment, # class: 'c'
Keyword: Colors.purple, # class: 'k'
Keyword.Constant: Colors.purple, # class: 'kc'
# Keyword.Declaration: "", # class: 'kd'
# Keyword.Namespace: "", # class: 'kn'
# Keyword.Pseudo: "", # class: 'kp'
# Keyword.Reserved: "", # class: 'kr'
Keyword.Type: Colors.orange, # class: 'kt'
Operator: Colors.green, # class: 'o'
Operator.Word: Colors.purple, # class: 'ow'
Punctuation: Colors.black, # class: 'p'
Name: Colors.black, # class: 'n'
Name.Attribute: Colors.yellow, # class: 'na'
Name.Builtin: Colors.orange, # class: 'nb'
Name.Builtin.Pseudo: Colors.orange, # class: 'bp'
Name.Class: Colors.blue, # class: 'nc'
Name.Constant: Colors.blue, # class: 'no'
Name.Decorator: Colors.orange, # class: 'nd'
Name.Entity: Colors.green, # class: 'ni'
Name.Exception: Colors.purple, # class: 'ne'
Name.Function: Colors.blue, # class: 'nf'
Name.Property: Colors.blue, # class: 'py'
Name.Label: Colors.orange, # class: 'nl'
Name.Namespace: Colors.black, # class: 'nn'
# Name.Other: "", # class: 'nx'
Name.Tag: Colors.blue, # class: 'nt'
Name.Variable: Colors.red, # class: 'nv'
Name.Variable.Magic: Colors.orange,
# Name.Variable.Class: "", # class: 'vc'
# Name.Variable.Global: "", # class: 'vg'
# Name.Variable.Instance: "", # class: 'vi'
Number: Colors.orange, # class: 'm'
# Number.Float: "", # class: 'mf'
# Number.Hex: "", # class: 'mh'
# Number.Integer: "", # class: 'mi'
# Number.Integer.Long: "", # class: 'il'
# Number.Oct: "", # class: 'mo'
Literal: Colors.orange, # class: 'l'
# Literal.Date: "", # class: 'ld'
String: Colors.green, # class: 's'
String.Backtick: Colors.green, # class: 'sb'
# String.Char: "", # class: 'sc'
# String.Doc: "", # class: 'sd'
# String.Double: "", # class: 's2'
# String.Escape: "", # class: 'se'
# String.Heredoc: "", # class: 'sh'
# String.Interpol: "", # class: 'si'
# String.Other: "", # class: 'sx'
String.Regex: Colors.red, # class: 'sr'
# String.Single: "", # class: 's1'
String.Symbol: Colors.blue, # class: 'ss'
# Generic: "", # class: 'g'
Generic.Deleted: Colors.blue, # class: 'gd',
Generic.Emph: "italic", # class: 'ge'
# Generic.Error: "", # class: 'gr'
Generic.Heading: Colors.blue, # class: 'gh'
Generic.Subheading: Colors.blue, # class: 'gu'
# Generic.Inserted: "", # class: 'gi'
# Generic.Output: "", # class: 'go'
# Generic.Prompt: "", # class: 'gp'
Generic.Strong: "bold", # class: 'gs'
# Generic.Traceback: "", # class: 'gt'
}