ThirdParty/Pygments/pygments/styles/rainbow_dash.py

changeset 5713
6762afd9f963
equal deleted inserted replaced
5712:f0d08bdeacf4 5713:6762afd9f963
1 # -*- coding: utf-8 -*-
2 """
3 pygments.styles.rainbow_dash
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5
6 A bright and colorful syntax highlighting `theme`.
7
8 .. _theme: http://sanssecours.github.io/Rainbow-Dash.tmbundle
9
10 :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
11 :license: BSD, see LICENSE for details.
12 """
13
14 from pygments.style import Style
15 from pygments.token import (Comment, Error, Generic, Name, Number, Operator,
16 String, Text, Whitespace, Keyword)
17
18 BLUE_LIGHT = '#0080ff'
19 BLUE = '#2c5dcd'
20 GREEN = '#00cc66'
21 GREEN_LIGHT = '#ccffcc'
22 GREEN_NEON = '#00cc00'
23 GREY = '#aaaaaa'
24 GREY_LIGHT = '#cbcbcb'
25 GREY_DARK = '#4d4d4d'
26 PURPLE = '#5918bb'
27 RED = '#cc0000'
28 RED_DARK = '#c5060b'
29 RED_LIGHT = '#ffcccc'
30 RED_BRIGHT = '#ff0000'
31 WHITE = '#ffffff'
32 TURQUOISE = '#318495'
33 ORANGE = '#ff8000'
34
35
36 class RainbowDashStyle(Style):
37 """
38 A bright and colorful syntax highlighting theme.
39 """
40
41 background_color = WHITE
42
43 styles = {
44 Comment: 'italic {}'.format(BLUE_LIGHT),
45 Comment.Preproc: 'noitalic',
46 Comment.Special: 'bold',
47
48 Error: 'bg:{} {}'.format(RED, WHITE),
49
50 Generic.Deleted: 'border:{} bg:{}'.format(RED_DARK, RED_LIGHT),
51 Generic.Emph: 'italic',
52 Generic.Error: RED_BRIGHT,
53 Generic.Heading: 'bold {}'.format(BLUE),
54 Generic.Inserted: 'border:{} bg:{}'.format(GREEN_NEON, GREEN_LIGHT),
55 Generic.Output: GREY,
56 Generic.Prompt: 'bold {}'.format(BLUE),
57 Generic.Strong: 'bold',
58 Generic.Subheading: 'bold {}'.format(BLUE),
59 Generic.Traceback: RED_DARK,
60
61 Keyword: 'bold {}'.format(BLUE),
62 Keyword.Pseudo: 'nobold',
63 Keyword.Type: PURPLE,
64
65 Name.Attribute: 'italic {}'.format(BLUE),
66 Name.Builtin: 'bold {}'.format(PURPLE),
67 Name.Class: 'underline',
68 Name.Constant: TURQUOISE,
69 Name.Decorator: 'bold {}'.format(ORANGE),
70 Name.Entity: 'bold {}'.format(PURPLE),
71 Name.Exception: 'bold {}'.format(PURPLE),
72 Name.Function: 'bold {}'.format(ORANGE),
73 Name.Tag: 'bold {}'.format(BLUE),
74
75 Number: 'bold {}'.format(PURPLE),
76
77 Operator: BLUE,
78 Operator.Word: 'bold',
79
80 String: GREEN,
81 String.Doc: 'italic',
82 String.Escape: 'bold {}'.format(RED_DARK),
83 String.Other: TURQUOISE,
84 String.Symbol: 'bold {}'.format(RED_DARK),
85
86 Text: GREY_DARK,
87
88 Whitespace: GREY_LIGHT
89 }

eric ide

mercurial