lightbulb.py 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. """
  2. pygments.styles.lightbulb
  3. ~~~~~~~~~~~~~~~~~~~~~~~~~
  4. A minimal dark theme based on the Lightbulb theme for VSCode.
  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 (
  10. Comment,
  11. Error,
  12. Generic,
  13. Keyword,
  14. Literal,
  15. Name,
  16. Number,
  17. Operator,
  18. Punctuation,
  19. String,
  20. Token,
  21. )
  22. __all__ = ['LightbulbStyle']
  23. COLORS = {
  24. "bg": "#1d2331",
  25. "blue_1": "#73D0FF",
  26. "gray_1": "#7e8aa1",
  27. "gray_2": "#3c4354",
  28. "gray_3": "#6e7681",
  29. "red_1": "#f88f7f",
  30. "red_2": "#3d1e20",
  31. "orange_1": "#FFAD66",
  32. "orange_2": "#F29E74",
  33. "yellow_1": "#FFD173",
  34. "white": "#d4d2c8",
  35. "magenta_1": "#DFBFFF",
  36. "green_1": "#D5FF80",
  37. "green_2": "#19362c",
  38. "cyan_1": "#95E6CB",
  39. }
  40. class LightbulbStyle(Style):
  41. """
  42. A minimal dark theme based on the Lightbulb theme for VSCode.
  43. """
  44. name = 'lightbulb'
  45. background_color = COLORS['bg']
  46. highlight_color = COLORS['gray_3']
  47. line_number_color = COLORS['gray_2']
  48. line_number_special_color = COLORS['gray_2']
  49. styles = {
  50. Comment: COLORS["gray_1"],
  51. Comment.Hashbang: "italic " + COLORS['red_1'],
  52. Comment.Preproc: "bold " + COLORS['orange_1'],
  53. Comment.Special: "italic " + COLORS['gray_1'],
  54. Error: COLORS['red_1'],
  55. Generic.Deleted: f"bg:{COLORS['red_2']} #f88f7f",
  56. Generic.Emph: "italic",
  57. Generic.Error: "#f88f7f",
  58. Generic.Inserted: f"bg:{COLORS['green_2']} #6ad4af",
  59. Generic.Output: COLORS['gray_1'],
  60. Generic.Strong: "bold",
  61. Generic.Traceback: COLORS['red_1'],
  62. Keyword: COLORS['orange_1'],
  63. Keyword.Constant: COLORS['orange_1'],
  64. Keyword.Declaration: COLORS['orange_1'],
  65. Keyword.Namespace: COLORS['orange_1'],
  66. Keyword.Reserved: COLORS['orange_1'],
  67. Keyword.Type: COLORS['blue_1'],
  68. Literal: COLORS['green_1'],
  69. Name: COLORS['white'],
  70. Name.Attribute: COLORS['yellow_1'],
  71. Name.Builtin: COLORS['yellow_1'],
  72. Name.Builtin.Pseudo: "#5CCFE6",
  73. Name.Class: COLORS['blue_1'],
  74. Name.Constant: COLORS['yellow_1'],
  75. Name.Decorator: "bold italic " + COLORS['gray_1'],
  76. Name.Entity: COLORS['cyan_1'],
  77. Name.Exception: COLORS['blue_1'],
  78. Name.Function: COLORS['yellow_1'],
  79. Name.Function.Magic: COLORS['yellow_1'],
  80. Name.Other: COLORS['white'],
  81. Name.Property: COLORS['yellow_1'],
  82. Name.Tag: "#5CCFE6",
  83. Name.Variable: COLORS['white'],
  84. Number: COLORS['magenta_1'],
  85. Operator: COLORS['orange_1'],
  86. Operator.Word: COLORS['orange_1'],
  87. Punctuation: COLORS['white'],
  88. String: COLORS['green_1'],
  89. String.Affix: COLORS['orange_2'],
  90. String.Doc: COLORS['gray_1'],
  91. String.Escape: COLORS['cyan_1'],
  92. String.Interpol: COLORS['cyan_1'],
  93. String.Other: COLORS['cyan_1'],
  94. String.Regex: COLORS['cyan_1'],
  95. String.Symbol: COLORS['magenta_1'],
  96. Token: COLORS['white'],
  97. }