pastie.py 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. """
  2. pygments.styles.pastie
  3. ~~~~~~~~~~~~~~~~~~~~~~
  4. Style similar to the `pastie`_ default style.
  5. .. _pastie: http://pastie.caboo.se/
  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, Error, \
  11. Number, Operator, Generic, Whitespace
  12. class PastieStyle(Style):
  13. """
  14. Style similar to the pastie default style.
  15. """
  16. default_style = ''
  17. styles = {
  18. Whitespace: '#bbbbbb',
  19. Comment: '#888888',
  20. Comment.Preproc: 'bold #cc0000',
  21. Comment.Special: 'bg:#fff0f0 bold #cc0000',
  22. String: 'bg:#fff0f0 #dd2200',
  23. String.Regex: 'bg:#fff0ff #008800',
  24. String.Other: 'bg:#f0fff0 #22bb22',
  25. String.Symbol: '#aa6600',
  26. String.Interpol: '#3333bb',
  27. String.Escape: '#0044dd',
  28. Operator.Word: '#008800',
  29. Keyword: 'bold #008800',
  30. Keyword.Pseudo: 'nobold',
  31. Keyword.Type: '#888888',
  32. Name.Class: 'bold #bb0066',
  33. Name.Exception: 'bold #bb0066',
  34. Name.Function: 'bold #0066bb',
  35. Name.Property: 'bold #336699',
  36. Name.Namespace: 'bold #bb0066',
  37. Name.Builtin: '#003388',
  38. Name.Variable: '#336699',
  39. Name.Variable.Class: '#336699',
  40. Name.Variable.Instance: '#3333bb',
  41. Name.Variable.Global: '#dd7700',
  42. Name.Constant: 'bold #003366',
  43. Name.Tag: 'bold #bb0066',
  44. Name.Attribute: '#336699',
  45. Name.Decorator: '#555555',
  46. Name.Label: 'italic #336699',
  47. Number: 'bold #0000DD',
  48. Generic.Heading: '#333',
  49. Generic.Subheading: '#666',
  50. Generic.Deleted: 'bg:#ffdddd #000000',
  51. Generic.Inserted: 'bg:#ddffdd #000000',
  52. Generic.Error: '#aa0000',
  53. Generic.Emph: 'italic',
  54. Generic.Strong: 'bold',
  55. Generic.Prompt: '#555555',
  56. Generic.Output: '#888888',
  57. Generic.Traceback: '#aa0000',
  58. Error: 'bg:#e3d2d2 #a61717'
  59. }