dracula.py 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. """
  2. pygments.styles.dracula
  3. ~~~~~~~~~~~~~~~~~~~~~~~
  4. Pygments version of `Dracula` from https://github.com/dracula/dracula-theme.
  5. Based on the Dracula Theme for pygments by Chris Bracco.
  6. See https://github.com/dracula/pygments/tree/fee9ed5613d1086bc01b9d0a5a0e9867a009f571
  7. :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
  8. :license: BSD, see LICENSE for details.
  9. """
  10. from pygments.style import Style
  11. from pygments.token import Keyword, Name, Comment, String, Error, Literal, \
  12. Number, Operator, Other, Punctuation, Text, Generic, Whitespace
  13. class DraculaStyle(Style):
  14. background_color = "#282a36"
  15. highlight_color = "#44475a"
  16. line_number_color = "#f1fa8c"
  17. line_number_background_color = "#44475a"
  18. line_number_special_color = "#50fa7b"
  19. line_number_special_background_color = "#6272a4"
  20. styles = {
  21. Whitespace: "#f8f8f2",
  22. Comment: "#6272a4",
  23. Comment.Hashbang: "#6272a4",
  24. Comment.Multiline: "#6272a4",
  25. Comment.Preproc: "#ff79c6",
  26. Comment.Single: "#6272a4",
  27. Comment.Special: "#6272a4",
  28. Generic: "#f8f8f2",
  29. Generic.Deleted: "#8b080b",
  30. Generic.Emph: "#f8f8f2 underline",
  31. Generic.Error: "#f8f8f2",
  32. Generic.Heading: "#f8f8f2 bold",
  33. Generic.Inserted: "#f8f8f2 bold",
  34. Generic.Output: "#44475a",
  35. Generic.Prompt: "#f8f8f2",
  36. Generic.Strong: "#f8f8f2",
  37. Generic.Subheading: "#f8f8f2 bold",
  38. Generic.Traceback: "#f8f8f2",
  39. Error: "#f8f8f2",
  40. Keyword: "#ff79c6",
  41. Keyword.Constant: "#ff79c6",
  42. Keyword.Declaration: "#8be9fd italic",
  43. Keyword.Namespace: "#ff79c6",
  44. Keyword.Pseudo: "#ff79c6",
  45. Keyword.Reserved: "#ff79c6",
  46. Keyword.Type: "#8be9fd",
  47. Literal: "#f8f8f2",
  48. Literal.Date: "#f8f8f2",
  49. Name: "#f8f8f2",
  50. Name.Attribute: "#50fa7b",
  51. Name.Builtin: "#8be9fd italic",
  52. Name.Builtin.Pseudo: "#f8f8f2",
  53. Name.Class: "#50fa7b",
  54. Name.Constant: "#f8f8f2",
  55. Name.Decorator: "#f8f8f2",
  56. Name.Entity: "#f8f8f2",
  57. Name.Exception: "#f8f8f2",
  58. Name.Function: "#50fa7b",
  59. Name.Label: "#8be9fd italic",
  60. Name.Namespace: "#f8f8f2",
  61. Name.Other: "#f8f8f2",
  62. Name.Tag: "#ff79c6",
  63. Name.Variable: "#8be9fd italic",
  64. Name.Variable.Class: "#8be9fd italic",
  65. Name.Variable.Global: "#8be9fd italic",
  66. Name.Variable.Instance: "#8be9fd italic",
  67. Number: "#ffb86c",
  68. Number.Bin: "#ffb86c",
  69. Number.Float: "#ffb86c",
  70. Number.Hex: "#ffb86c",
  71. Number.Integer: "#ffb86c",
  72. Number.Integer.Long: "#ffb86c",
  73. Number.Oct: "#ffb86c",
  74. Operator: "#ff79c6",
  75. Operator.Word: "#ff79c6",
  76. Other: "#f8f8f2",
  77. Punctuation: "#f8f8f2",
  78. String: "#bd93f9",
  79. String.Backtick: "#bd93f9",
  80. String.Char: "#bd93f9",
  81. String.Doc: "#bd93f9",
  82. String.Double: "#bd93f9",
  83. String.Escape: "#bd93f9",
  84. String.Heredoc: "#bd93f9",
  85. String.Interpol: "#bd93f9",
  86. String.Other: "#bd93f9",
  87. String.Regex: "#bd93f9",
  88. String.Single: "#bd93f9",
  89. String.Symbol: "#bd93f9",
  90. Text: "#f8f8f2",
  91. }