gruvbox.py 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. """
  2. pygments.styles.gruvbox
  3. ~~~~~~~~~~~~~~~~~~~~~~~
  4. pygments version of the "gruvbox" vim theme.
  5. https://github.com/morhetz/gruvbox
  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 Token, Keyword, Name, Comment, String, Error, \
  11. Number, Operator, Generic
  12. __all__ = ['GruvboxDarkStyle', 'GruvboxLightStyle']
  13. class GruvboxDarkStyle(Style):
  14. """
  15. Pygments version of the "gruvbox" dark vim theme.
  16. """
  17. name = 'gruvbox-dark'
  18. background_color = '#282828'
  19. highlight_color = '#ebdbb2'
  20. styles = {
  21. Token: '#dddddd',
  22. Comment: 'italic #928374',
  23. Comment.PreProc: '#8ec07c',
  24. Comment.Special: 'bold italic #ebdbb2',
  25. Keyword: '#fb4934',
  26. Operator.Word: '#fb4934',
  27. String: '#b8bb26',
  28. String.Escape: '#fe8019',
  29. Number: '#d3869b',
  30. Name.Builtin: '#fe8019',
  31. Name.Variable: '#83a598',
  32. Name.Constant: '#d3869b',
  33. Name.Class: '#8ec07c',
  34. Name.Function: '#8ec07c',
  35. Name.Namespace: '#8ec07c',
  36. Name.Exception: '#fb4934',
  37. Name.Tag: '#8ec07c',
  38. Name.Attribute: '#fabd2f',
  39. Name.Decorator: '#fb4934',
  40. Generic.Heading: 'bold #ebdbb2',
  41. Generic.Subheading: 'underline #ebdbb2',
  42. Generic.Deleted: 'bg:#fb4934 #282828',
  43. Generic.Inserted: 'bg:#b8bb26 #282828',
  44. Generic.Error: '#fb4934',
  45. Generic.Emph: 'italic',
  46. Generic.Strong: 'bold',
  47. Generic.EmphStrong: 'bold italic',
  48. Generic.Prompt: '#a89984',
  49. Generic.Output: '#f2e5bc',
  50. Generic.Traceback: '#fb4934',
  51. Error: 'bg:#fb4934 #282828'
  52. }
  53. class GruvboxLightStyle(Style):
  54. """
  55. Pygments version of the "gruvbox" Light vim theme.
  56. """
  57. name = 'gruvbox-light'
  58. background_color = '#fbf1c7'
  59. highlight_color = '#3c3836'
  60. styles = {
  61. Comment: 'italic #928374',
  62. Comment.PreProc: '#427b58',
  63. Comment.Special: 'bold italic #3c3836',
  64. Keyword: '#9d0006',
  65. Operator.Word: '#9d0006',
  66. String: '#79740e',
  67. String.Escape: '#af3a03',
  68. Number: '#8f3f71',
  69. Name.Builtin: '#af3a03',
  70. Name.Variable: '#076678',
  71. Name.Constant: '#8f3f71',
  72. Name.Class: '#427b58',
  73. Name.Function: '#427b58',
  74. Name.Namespace: '#427b58',
  75. Name.Exception: '#9d0006',
  76. Name.Tag: '#427b58',
  77. Name.Attribute: '#b57614',
  78. Name.Decorator: '#9d0006',
  79. Generic.Heading: 'bold #3c3836',
  80. Generic.Subheading: 'underline #3c3836',
  81. Generic.Deleted: 'bg:#9d0006 #fbf1c7',
  82. Generic.Inserted: 'bg:#79740e #fbf1c7',
  83. Generic.Error: '#9d0006',
  84. Generic.Emph: 'italic',
  85. Generic.Strong: 'bold',
  86. Generic.Prompt: '#7c6f64',
  87. Generic.Output: '#32302f',
  88. Generic.Traceback: '#9d0006',
  89. Error: 'bg:#9d0006 #fbf1c7'
  90. }