pastie.py 2.4 KB

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