friendly.py 2.5 KB

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