material.py 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. """
  2. pygments.styles.material
  3. ~~~~~~~~~~~~~~~~~~~~~~~~
  4. Mimic the Material theme color scheme.
  5. https://github.com/material-theme/vsc-material-theme
  6. :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
  7. :license: BSD, see LICENSE for details.
  8. """
  9. from pygments.style import Style
  10. from pygments.token import Keyword, Name, Comment, String, Escape, \
  11. Error, Text, Number, Operator, Generic, Punctuation, Literal
  12. class MaterialStyle(Style):
  13. """
  14. This style mimics the Material Theme color scheme.
  15. """
  16. dark_teal = '#263238'
  17. white= '#FFFFFF'
  18. black= '#000000'
  19. red= '#FF5370'
  20. orange= '#F78C6C'
  21. yellow= '#FFCB6B'
  22. green= '#C3E88D'
  23. cyan= '#89DDFF'
  24. blue= '#82AAFF'
  25. paleblue= '#B2CCD6'
  26. purple= '#C792EA'
  27. brown= '#C17E70'
  28. pink= '#F07178'
  29. violet= '#BB80B3'
  30. foreground = '#EEFFFF'
  31. faded = '#546E7A'
  32. default_style = ""
  33. background_color = dark_teal
  34. highlight_color = '#2C3B41'
  35. line_number_color = '#37474F'
  36. line_number_background_color = dark_teal
  37. line_number_special_color = '#607A86'
  38. line_number_special_background_color = dark_teal
  39. styles = {
  40. Text: foreground,
  41. Escape: cyan,
  42. Error: red,
  43. Keyword: violet,
  44. Keyword.Constant: cyan,
  45. Keyword.Declaration: violet,
  46. Keyword.Namespace: 'italic ' + cyan,
  47. Keyword.Pseudo: cyan,
  48. Keyword.Type: violet,
  49. Name: foreground,
  50. Name.Attribute: violet,
  51. Name.Builtin: blue,
  52. Name.Builtin.Pseudo: cyan,
  53. Name.Class: yellow,
  54. Name.Constant: foreground,
  55. Name.Decorator: blue,
  56. Name.Entity: cyan,
  57. Name.Exception: yellow,
  58. Name.Function: blue,
  59. Name.Function.Magic: blue,
  60. Name.Label: blue,
  61. Name.Property: yellow,
  62. Name.Namespace: yellow,
  63. Name.Other: foreground,
  64. Name.Tag: red,
  65. Name.Variable: cyan,
  66. Name.Variable.Class: cyan,
  67. Name.Variable.Global: cyan,
  68. Name.Variable.Instance: cyan,
  69. Name.Variable.Magic: blue,
  70. Literal: green,
  71. Literal.Date: green,
  72. String: green,
  73. String.Affix: violet,
  74. String.Backtick: green,
  75. String.Char: green,
  76. String.Delimiter: foreground,
  77. String.Doc: 'italic ' + faded,
  78. String.Double: green,
  79. String.Escape: foreground,
  80. String.Heredoc: green,
  81. String.Interpol: cyan,
  82. String.Other: green,
  83. String.Regex: cyan,
  84. String.Single: green,
  85. String.Symbol: cyan,
  86. Number: orange,
  87. Operator: cyan,
  88. Operator.Word: 'italic ' + cyan,
  89. Punctuation: cyan,
  90. Comment: 'italic ' + faded,
  91. Generic: foreground,
  92. Generic.Deleted: red,
  93. Generic.Emph: cyan,
  94. Generic.Error: red,
  95. Generic.Heading: green,
  96. Generic.Inserted: green,
  97. Generic.Output: faded,
  98. Generic.Prompt: yellow,
  99. Generic.Strong: red,
  100. Generic.Subheading: cyan,
  101. Generic.Traceback: red,
  102. }