Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
lovelace.py101 linesDownload Raw Back to styles
1"""2    pygments.styles.lovelace3    ~~~~~~~~~~~~~~~~~~~~~~~~4 5    Lovelace by Miikka Salminen6 7    Pygments style by Miikka Salminen (https://github.com/miikkas)8    A desaturated, somewhat subdued style created for the Lovelace interactive9    learning environment.10 11    :copyright: Copyright 2006-present by the Pygments team, see AUTHORS.12    :license: BSD, see LICENSE for details.13"""14 15from pygments.style import Style16from pygments.token import Keyword, Name, Comment, String, Error, \17    Number, Operator, Punctuation, Generic, Whitespace18 19 20__all__ = ['LovelaceStyle']21 22 23class LovelaceStyle(Style):24    """25    The style used in Lovelace interactive learning environment. Tries to avoid26    the "angry fruit salad" effect with desaturated and dim colours.27    """28    name = 'lovelace'29 30    _KW_BLUE = '#2838b0'31    _NAME_GREEN = '#388038'32    _DOC_ORANGE = '#b85820'33    _OW_PURPLE = '#a848a8'34    _FUN_BROWN = '#785840'35    _STR_RED = '#b83838'36    _CLS_CYAN = '#287088'37    _ESCAPE_LIME = '#709030'38    _LABEL_CYAN = '#289870'39    _EXCEPT_YELLOW = '#908828'40 41    styles = {42        Whitespace:          '#a89028',43        Comment:             'italic #888888',44        Comment.Hashbang:    _CLS_CYAN,45        Comment.Multiline:   '#888888',46        Comment.Preproc:     'noitalic '+_LABEL_CYAN,47 48        Keyword:             _KW_BLUE,49        Keyword.Constant:    'italic #444444',50        Keyword.Declaration: 'italic',51        Keyword.Type:        'italic',52 53        Operator:            '#666666',54        Operator.Word:       _OW_PURPLE,55 56        Punctuation:         '#888888',57 58        Name.Attribute:      _NAME_GREEN,59        Name.Builtin:        _NAME_GREEN,60        Name.Builtin.Pseudo: 'italic',61        Name.Class:          _CLS_CYAN,62        Name.Constant:       _DOC_ORANGE,63        Name.Decorator:      _CLS_CYAN,64        Name.Entity:         _ESCAPE_LIME,65        Name.Exception:      _EXCEPT_YELLOW,66        Name.Function:       _FUN_BROWN,67        Name.Function.Magic: _DOC_ORANGE,68        Name.Label:          _LABEL_CYAN,69        Name.Namespace:      _LABEL_CYAN,70        Name.Tag:            _KW_BLUE,71        Name.Variable:       '#b04040',72        Name.Variable.Global:_EXCEPT_YELLOW,73        Name.Variable.Magic: _DOC_ORANGE,74 75        String:              _STR_RED,76        String.Affix:        '#444444',77        String.Char:         _OW_PURPLE,78        String.Delimiter:    _DOC_ORANGE,79        String.Doc:          'italic '+_DOC_ORANGE,80        String.Escape:       _ESCAPE_LIME,81        String.Interpol:     'underline',82        String.Other:        _OW_PURPLE,83        String.Regex:        _OW_PURPLE,84 85        Number:              '#444444',86 87        Generic.Deleted:     '#c02828',88        Generic.Emph:        'italic',89        Generic.Error:       '#c02828',90        Generic.Heading:     '#666666',91        Generic.Subheading:  '#444444',92        Generic.Inserted:    _NAME_GREEN,93        Generic.Output:      '#666666',94        Generic.Prompt:      '#444444',95        Generic.Strong:      'bold',96        Generic.EmphStrong:  'bold italic',97        Generic.Traceback:   _KW_BLUE,98 99        Error:               'bg:'+_OW_PURPLE,100    }101 
codekingpro/portable-devtools · Team Ai