friendly.py 2.5 KB

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