onedark.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. """
  2. pygments.styles.onedark
  3. ~~~~~~~~~~~~~~~~~~~~~~~
  4. One Dark Theme for Pygments by Tobias Zoghaib (https://github.com/TobiZog)
  5. Inspired by one-dark-ui for the code editor Atom
  6. (https://atom.io/themes/one-dark-ui).
  7. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
  8. :license: BSD, see LICENSE for details.
  9. """
  10. from pygments.style import Style
  11. from pygments.token import Comment, Keyword, Name, Number, Operator, \
  12. Punctuation, String, Token
  13. __all__ = ['OneDarkStyle']
  14. class OneDarkStyle(Style):
  15. """
  16. Theme inspired by One Dark Pro for Atom.
  17. .. versionadded:: 2.11
  18. """
  19. name = 'one-dark'
  20. background_color = '#282C34'
  21. styles = {
  22. Token: '#ABB2BF',
  23. Punctuation: '#ABB2BF',
  24. Punctuation.Marker: '#ABB2BF',
  25. Keyword: '#C678DD',
  26. Keyword.Constant: '#E5C07B',
  27. Keyword.Declaration: '#C678DD',
  28. Keyword.Namespace: '#C678DD',
  29. Keyword.Reserved: '#C678DD',
  30. Keyword.Type: '#E5C07B',
  31. Name: '#E06C75',
  32. Name.Attribute: '#E06C75',
  33. Name.Builtin: '#E5C07B',
  34. Name.Class: '#E5C07B',
  35. Name.Function: 'bold #61AFEF',
  36. Name.Function.Magic: 'bold #56B6C2',
  37. Name.Other: '#E06C75',
  38. Name.Tag: '#E06C75',
  39. Name.Decorator: '#61AFEF',
  40. Name.Variable.Class: '',
  41. String: '#98C379',
  42. Number: '#D19A66',
  43. Operator: '#56B6C2',
  44. Comment: '#7F848E'
  45. }