friendly.py 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. """
  2. pygments.styles.friendly
  3. ~~~~~~~~~~~~~~~~~~~~~~~~
  4. A modern style based on the VIM pyte theme.
  5. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
  6. :license: BSD, see LICENSE for details.
  7. """
  8. from pygments.style import Style
  9. from pygments.token import Keyword, Name, Comment, String, Error, \
  10. Number, Operator, Generic, Whitespace
  11. class FriendlyStyle(Style):
  12. """
  13. A modern style based on the VIM pyte theme.
  14. """
  15. background_color = "#f0f0f0"
  16. line_number_color = "#666666"
  17. styles = {
  18. Whitespace: "#bbbbbb",
  19. Comment: "italic #60a0b0",
  20. Comment.Preproc: "noitalic #007020",
  21. Comment.Special: "noitalic bg:#fff0f0",
  22. Keyword: "bold #007020",
  23. Keyword.Pseudo: "nobold",
  24. Keyword.Type: "nobold #902000",
  25. Operator: "#666666",
  26. Operator.Word: "bold #007020",
  27. Name.Builtin: "#007020",
  28. Name.Function: "#06287e",
  29. Name.Class: "bold #0e84b5",
  30. Name.Namespace: "bold #0e84b5",
  31. Name.Exception: "#007020",
  32. Name.Variable: "#bb60d5",
  33. Name.Constant: "#60add5",
  34. Name.Label: "bold #002070",
  35. Name.Entity: "bold #d55537",
  36. Name.Attribute: "#4070a0",
  37. Name.Tag: "bold #062873",
  38. Name.Decorator: "bold #555555",
  39. String: "#4070a0",
  40. String.Doc: "italic",
  41. String.Interpol: "italic #70a0d0",
  42. String.Escape: "bold #4070a0",
  43. String.Regex: "#235388",
  44. String.Symbol: "#517918",
  45. String.Other: "#c65d09",
  46. Number: "#40a070",
  47. Generic.Heading: "bold #000080",
  48. Generic.Subheading: "bold #800080",
  49. Generic.Deleted: "#A00000",
  50. Generic.Inserted: "#00A000",
  51. Generic.Error: "#FF0000",
  52. Generic.Emph: "italic",
  53. Generic.Strong: "bold",
  54. Generic.Prompt: "bold #c65d09",
  55. Generic.Output: "#888",
  56. Generic.Traceback: "#04D",
  57. Error: "border:#FF0000"
  58. }