ThirdParty/Pygments/pygments/styles/lovelace.py

changeset 4697
c2e9bf425554
child 5713
6762afd9f963
equal deleted inserted replaced
4696:bf4d19a7cade 4697:c2e9bf425554
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-2015 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.Label: _LABEL_CYAN,
66 Name.Namespace: _LABEL_CYAN,
67 Name.Tag: _KW_BLUE,
68 Name.Variable: '#b04040',
69 Name.Variable.Global:_EXCEPT_YELLOW,
70
71 String: _STR_RED,
72 String.Char: _OW_PURPLE,
73 String.Doc: 'italic '+_DOC_ORANGE,
74 String.Escape: _ESCAPE_LIME,
75 String.Interpol: 'underline',
76 String.Other: _OW_PURPLE,
77 String.Regex: _OW_PURPLE,
78
79 Number: '#444444',
80
81 Generic.Deleted: '#c02828',
82 Generic.Emph: 'italic',
83 Generic.Error: '#c02828',
84 Generic.Heading: '#666666',
85 Generic.Subheading: '#444444',
86 Generic.Inserted: _NAME_GREEN,
87 Generic.Output: '#666666',
88 Generic.Prompt: '#444444',
89 Generic.Strong: 'bold',
90 Generic.Traceback: _KW_BLUE,
91
92 Error: 'bg:'+_OW_PURPLE,
93 }

eric ide

mercurial