material.py 4.1 KB

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