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