codekingpro/portable-devtools
114k
1"""2 pygments.styles.tango3 ~~~~~~~~~~~~~~~~~~~~~4 5 The Crunchy default Style inspired from the color palette from6 the Tango Icon Theme Guidelines.7 8 http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines9 10 Butter: #fce94f #edd400 #c4a00011 Orange: #fcaf3e #f57900 #ce5c0012 Chocolate: #e9b96e #c17d11 #8f590213 Chameleon: #8ae234 #73d216 #4e9a0614 Sky Blue: #729fcf #3465a4 #204a8715 Plum: #ad7fa8 #75507b #5c35cc16 Scarlet Red:#ef2929 #cc0000 #a4000017 Aluminium: #eeeeec #d3d7cf #babdb618 #888a85 #555753 #2e343619 20 Not all of the above colors are used; other colors added:21 very light grey: #f8f8f8 (for background)22 23 This style can be used as a template as it includes all the known24 Token types, unlike most (if not all) of the styles included in the25 Pygments distribution.26 27 However, since Crunchy is intended to be used by beginners, we have strived28 to create a style that gloss over subtle distinctions between different29 categories.30 31 Taking Python for example, comments (Comment.*) and docstrings (String.Doc)32 have been chosen to have the same style. Similarly, keywords (Keyword.*),33 and Operator.Word (and, or, in) have been assigned the same style.34 35 :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.36 :license: BSD, see LICENSE for details.37"""38 39from pygments.style import Style40from pygments.token import Keyword, Name, Comment, String, Error, \41 Number, Operator, Generic, Whitespace, Punctuation, Other, Literal42 43 44__all__ = ['TangoStyle']45 46 47class TangoStyle(Style):48 """49 The Crunchy default Style inspired from the color palette from50 the Tango Icon Theme Guidelines.51 """52 53 name = 'tango'54 55 background_color = "#f8f8f8"56 57 styles = {58 # No corresponding class for the following:59 #Text: "", # class: ''60 Whitespace: "#f8f8f8", # class: 'w'61 Error: "#a40000 border:#ef2929", # class: 'err'62 Other: "#000000", # class 'x'63 64 Comment: "italic #8f5902", # class: 'c'65 Comment.Multiline: "italic #8f5902", # class: 'cm'66 Comment.Preproc: "italic #8f5902", # class: 'cp'67 Comment.Single: "italic #8f5902", # class: 'c1'68 Comment.Special: "italic #8f5902", # class: 'cs'69 70 Keyword: "bold #204a87", # class: 'k'71 Keyword.Constant: "bold #204a87", # class: 'kc'72 Keyword.Declaration: "bold #204a87", # class: 'kd'73 Keyword.Namespace: "bold #204a87", # class: 'kn'74 Keyword.Pseudo: "bold #204a87", # class: 'kp'75 Keyword.Reserved: "bold #204a87", # class: 'kr'76 Keyword.Type: "bold #204a87", # class: 'kt'77 78 Operator: "bold #ce5c00", # class: 'o'79 Operator.Word: "bold #204a87", # class: 'ow' - like keywords80 81 Punctuation: "bold #000000", # class: 'p'82 83 # because special names such as Name.Class, Name.Function, etc.84 # are not recognized as such later in the parsing, we choose them85 # to look the same as ordinary variables.86 Name: "#000000", # class: 'n'87 Name.Attribute: "#c4a000", # class: 'na' - to be revised88 Name.Builtin: "#204a87", # class: 'nb'89 Name.Builtin.Pseudo: "#3465a4", # class: 'bp'90 Name.Class: "#000000", # class: 'nc' - to be revised91 Name.Constant: "#000000", # class: 'no' - to be revised92 Name.Decorator: "bold #5c35cc", # class: 'nd' - to be revised93 Name.Entity: "#ce5c00", # class: 'ni'94 Name.Exception: "bold #cc0000", # class: 'ne'95 Name.Function: "#000000", # class: 'nf'96 Name.Property: "#000000", # class: 'py'97 Name.Label: "#f57900", # class: 'nl'98 Name.Namespace: "#000000", # class: 'nn' - to be revised99 Name.Other: "#000000", # class: 'nx'100 Name.Tag: "bold #204a87", # class: 'nt' - like a keyword101 Name.Variable: "#000000", # class: 'nv' - to be revised102 Name.Variable.Class: "#000000", # class: 'vc' - to be revised103 Name.Variable.Global: "#000000", # class: 'vg' - to be revised104 Name.Variable.Instance: "#000000", # class: 'vi' - to be revised105 106 # since the tango light blue does not show up well in text, we choose107 # a pure blue instead.108 Number: "bold #0000cf", # class: 'm'109 Number.Float: "bold #0000cf", # class: 'mf'110 Number.Hex: "bold #0000cf", # class: 'mh'111 Number.Integer: "bold #0000cf", # class: 'mi'112 Number.Integer.Long: "bold #0000cf", # class: 'il'113 Number.Oct: "bold #0000cf", # class: 'mo'114 115 Literal: "#000000", # class: 'l'116 Literal.Date: "#000000", # class: 'ld'117 118 String: "#4e9a06", # class: 's'119 String.Backtick: "#4e9a06", # class: 'sb'120 String.Char: "#4e9a06", # class: 'sc'121 String.Doc: "italic #8f5902", # class: 'sd' - like a comment122 String.Double: "#4e9a06", # class: 's2'123 String.Escape: "#4e9a06", # class: 'se'124 String.Heredoc: "#4e9a06", # class: 'sh'125 String.Interpol: "#4e9a06", # class: 'si'126 String.Other: "#4e9a06", # class: 'sx'127 String.Regex: "#4e9a06", # class: 'sr'128 String.Single: "#4e9a06", # class: 's1'129 String.Symbol: "#4e9a06", # class: 'ss'130 131 Generic: "#000000", # class: 'g'132 Generic.Deleted: "#a40000", # class: 'gd'133 Generic.Emph: "italic #000000", # class: 'ge'134 Generic.Error: "#ef2929", # class: 'gr'135 Generic.Heading: "bold #000080", # class: 'gh'136 Generic.Inserted: "#00A000", # class: 'gi'137 Generic.Output: "italic #000000", # class: 'go'138 Generic.Prompt: "#8f5902", # class: 'gp'139 Generic.Strong: "bold #000000", # class: 'gs'140 Generic.EmphStrong: "bold italic #000000", # class: 'ges'141 Generic.Subheading: "bold #800080", # class: 'gu'142 Generic.Traceback: "bold #a40000", # class: 'gt'143 }144 