eric6/ThirdParty/Pygments/pygments/styles/lovelace.py

changeset 6942
2602857055c5
parent 5713
6762afd9f963
child 7547
21b0534faebc
equal deleted inserted replaced
6941:f99d60d6b59b 6942:2602857055c5
1 # -*- coding: utf-8 -*-
2 """
3 pygments.styles.lovelace
4 ~~~~~~~~~~~~~~~~~~~~~~~~
5
6 Lovelace by Miikka Salminen
7
8 Pygments style by Miikka Salminen (https://github.com/miikkas)
9 A desaturated, somewhat subdued style created for the Lovelace interactive
10 learning environment.
11
12 :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
13 :license: BSD, see LICENSE for details.
14 """
15
16 from pygments.style import Style
17 from pygments.token import Keyword, Name, Comment, String, Error, \
18 Number, Operator, Punctuation, Generic, Whitespace
19
20
21 class LovelaceStyle(Style):
22 """
23 The style used in Lovelace interactive learning environment. Tries to avoid
24 the "angry fruit salad" effect with desaturated and dim colours.
25 """
26 _KW_BLUE = '#2838b0'
27 _NAME_GREEN = '#388038'
28 _DOC_ORANGE = '#b85820'
29 _OW_PURPLE = '#a848a8'
30 _FUN_BROWN = '#785840'
31 _STR_RED = '#b83838'
32 _CLS_CYAN = '#287088'
33 _ESCAPE_LIME = '#709030'
34 _LABEL_CYAN = '#289870'
35 _EXCEPT_YELLOW = '#908828'
36
37 default_style = '#222222'
38
39 styles = {
40 Whitespace: '#a89028',
41 Comment: 'italic #888888',
42 Comment.Hashbang: _CLS_CYAN,
43 Comment.Multiline: '#888888',
44 Comment.Preproc: 'noitalic '+_LABEL_CYAN,
45
46 Keyword: _KW_BLUE,
47 Keyword.Constant: 'italic #444444',
48 Keyword.Declaration: 'italic',
49 Keyword.Type: 'italic',
50
51 Operator: '#666666',
52 Operator.Word: _OW_PURPLE,
53
54 Punctuation: '#888888',
55
56 Name.Attribute: _NAME_GREEN,
57 Name.Builtin: _NAME_GREEN,
58 Name.Builtin.Pseudo: 'italic',
59 Name.Class: _CLS_CYAN,
60 Name.Constant: _DOC_ORANGE,
61 Name.Decorator: _CLS_CYAN,
62 Name.Entity: _ESCAPE_LIME,
63 Name.Exception: _EXCEPT_YELLOW,
64 Name.Function: _FUN_BROWN,
65 Name.Function.Magic: _DOC_ORANGE,
66 Name.Label: _LABEL_CYAN,
67 Name.Namespace: _LABEL_CYAN,
68 Name.Tag: _KW_BLUE,
69 Name.Variable: '#b04040',
70 Name.Variable.Global:_EXCEPT_YELLOW,
71 Name.Variable.Magic: _DOC_ORANGE,
72
73 String: _STR_RED,
74 String.Affix: '#444444',
75 String.Char: _OW_PURPLE,
76 String.Delimiter: _DOC_ORANGE,
77 String.Doc: 'italic '+_DOC_ORANGE,
78 String.Escape: _ESCAPE_LIME,
79 String.Interpol: 'underline',
80 String.Other: _OW_PURPLE,
81 String.Regex: _OW_PURPLE,
82
83 Number: '#444444',
84
85 Generic.Deleted: '#c02828',
86 Generic.Emph: 'italic',
87 Generic.Error: '#c02828',
88 Generic.Heading: '#666666',
89 Generic.Subheading: '#444444',
90 Generic.Inserted: _NAME_GREEN,
91 Generic.Output: '#666666',
92 Generic.Prompt: '#444444',
93 Generic.Strong: 'bold',
94 Generic.Traceback: _KW_BLUE,
95
96 Error: 'bg:'+_OW_PURPLE,
97 }

eric ide

mercurial