File: _pygments_dark.py

package info (click to toggle)
python-autoray 0.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,744 kB
  • sloc: python: 6,043; makefile: 20
file content (121 lines) | stat: -rw-r--r-- 4,137 bytes parent folder | download
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# -*- coding: utf-8 -*-
"""
Pygments version of the sublime Mariana theme.

Pygments template by Jan T. Sott (https://github.com/idleberg)
"""

from pygments.style import Style
from pygments.token import (
    Keyword,
    Name,
    Comment,
    String,
    Error,
    Text,
    Number,
    Operator,
    Generic,
    Whitespace,
    Punctuation,
    Other,
    Literal,
)


BACKGROUND = "#1a1c1e"
CURRENT_LINE = "#4e5a65"
SELECTION = "#343d46"
FOREGROUND = "#d8dee9"
COMMENT = "#5a6272"
RED = "#ec5f66"
ORANGE = "#f9ae58"
YELLOW = "#fac761"
GREEN = "#99c794"
AQUA = "#70c2bb"
BLUE = "#6699cc"
PURPLE = "#c695c6"


class MarianaDark(Style):
    default_style = ""

    background_color = BACKGROUND
    highlight_color = SELECTION

    background_color = BACKGROUND
    highlight_color = SELECTION

    styles = {
        # No corresponding class for the following:
        Text: FOREGROUND,  # class:  ''
        Whitespace: "",  # class: 'w'
        Error: RED,  # class: 'err'
        Other: "",  # class 'x'
        Comment: COMMENT,  # class: 'c'
        Comment.Multiline: "",  # class: 'cm'
        Comment.Preproc: "",  # class: 'cp'
        Comment.Single: "",  # class: 'c1'
        Comment.Special: "",  # class: 'cs'
        Keyword: PURPLE,  # class: 'k'
        Keyword.Constant: RED,  # class: 'kc'
        Keyword.Declaration: "",  # class: 'kd'
        Keyword.Namespace: PURPLE,  # class: 'kn'
        Keyword.Pseudo: RED,  # class: 'kp'
        Keyword.Reserved: "",  # class: 'kr'
        Keyword.Type: YELLOW,  # class: 'kt'
        Operator: RED,  # class: 'o'
        Operator.Word: "",  # class: 'ow' - like keywords
        Punctuation: AQUA,  # class: 'p'
        Name: FOREGROUND,  # class: 'n'
        Name.Attribute: BLUE,  # class: 'na' - to be revised
        Name.Builtin: BLUE,  # class: 'nb'
        Name.Builtin.Pseudo: RED,  # class: 'bp'
        Name.Class: ORANGE,  # class: 'nc' - to be revised
        Name.Constant: RED,  # class: 'no' - to be revised
        Name.Decorator: AQUA,  # class: 'nd' - to be revised
        Name.Entity: BLUE,  # class: 'ni'
        Name.Exception: RED,  # class: 'ne'
        Name.Function: AQUA,  # class: 'nf'
        Name.Function.Magic: BLUE,  # class: 'nf'
        Name.Property: BLUE,  # class: 'py'
        Name.Label: BLUE,  # class: 'nl'
        Name.Namespace: BLUE,  # class: 'nn' - to be revised
        Name.Other: BLUE,  # class: 'nx'
        Name.Tag: AQUA,  # class: 'nt' - like a keyword
        Name.Variable: RED,  # class: 'nv' - to be revised
        Name.Variable.Class: "",  # class: 'vc' - to be revised
        Name.Variable.Global: "",  # class: 'vg' - to be revised
        Name.Variable.Instance: "",  # class: 'vi' - to be revised
        Number: 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: ORANGE,  # class: 'l'
        Literal.Date: GREEN,  # class: 'ld'
        String: GREEN,  # class: 's'
        String.Backtick: "",  # class: 'sb'
        String.Char: FOREGROUND,  # class: 'sc'
        String.Doc: COMMENT,  # class: 'sd' - like a comment
        String.Double: "",  # class: 's2'
        String.Escape: ORANGE,  # class: 'se'
        String.Heredoc: "",  # class: 'sh'
        String.Interpol: ORANGE,  # class: 'si'
        String.Other: "",  # class: 'sx'
        String.Regex: "",  # class: 'sr'
        String.Single: "",  # class: 's1'
        String.Symbol: "",  # class: 'ss'
        Generic: "",  # class: 'g'
        Generic.Deleted: RED,  # class: 'gd',
        Generic.Emph: "italic",  # class: 'ge'
        Generic.Error: "",  # class: 'gr'
        Generic.Heading: "bold " + FOREGROUND,  # class: 'gh'
        Generic.Inserted: GREEN,  # class: 'gi'
        Generic.Output: "",  # class: 'go'
        Generic.Prompt: "bold " + COMMENT,  # class: 'gp'
        Generic.Strong: "bold",  # class: 'gs'
        Generic.Subheading: "bold " + AQUA,  # class: 'gu'
        Generic.Traceback: "",  # class: 'gt'
    }