nord.py 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. """
  2. pygments.styles.nord
  3. ~~~~~~~~~~~~~~~~~~~~
  4. pygments version of the "nord" theme by Arctic Ice Studio
  5. https://www.nordtheme.com/
  6. :copyright: Copyright 2006-2024 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, Number, \
  11. Operator, Generic, Whitespace, Punctuation, Text, Token
  12. __all__ = ['NordStyle', 'NordDarkerStyle']
  13. class NordStyle(Style):
  14. """
  15. Pygments version of the "nord" theme by Arctic Ice Studio.
  16. """
  17. name = 'nord'
  18. line_number_color = "#D8DEE9"
  19. line_number_background_color = "#242933"
  20. line_number_special_color = "#242933"
  21. line_number_special_background_color = "#D8DEE9"
  22. background_color = "#2E3440"
  23. highlight_color = "#3B4252"
  24. styles = {
  25. Token: "#d8dee9",
  26. Whitespace: '#d8dee9',
  27. Punctuation: '#eceff4',
  28. Comment: 'italic #616e87',
  29. Comment.Preproc: '#5e81ac',
  30. Keyword: 'bold #81a1c1',
  31. Keyword.Pseudo: 'nobold #81a1c1',
  32. Keyword.Type: 'nobold #81a1c1',
  33. Operator: 'bold #81a1c1',
  34. Operator.Word: 'bold #81a1c1',
  35. Name: '#d8dee9',
  36. Name.Builtin: '#81a1c1',
  37. Name.Function: '#88c0d0',
  38. Name.Class: '#8fbcbb',
  39. Name.Namespace: '#8fbcbb',
  40. Name.Exception: '#bf616a',
  41. Name.Variable: '#d8dee9',
  42. Name.Constant: '#8fbcbb',
  43. Name.Entity: '#d08770',
  44. Name.Attribute: '#8fbcbb',
  45. Name.Tag: '#81a1c1',
  46. Name.Decorator: '#d08770',
  47. String: '#a3be8c',
  48. String.Doc: '#616e87',
  49. String.Interpol: '#a3be8c',
  50. String.Escape: '#ebcb8b',
  51. String.Regex: '#ebcb8b',
  52. String.Symbol: '#a3be8c',
  53. String.Other: '#a3be8c',
  54. Number: '#b48ead',
  55. Generic.Heading: 'bold #88c0d0',
  56. Generic.Subheading: 'bold #88c0d0',
  57. Generic.Deleted: '#bf616a',
  58. Generic.Inserted: '#a3be8c',
  59. Generic.Error: '#bf616a',
  60. Generic.Emph: 'italic',
  61. Generic.Strong: 'bold',
  62. Generic.EmphStrong: 'bold italic',
  63. Generic.Prompt: 'bold #616e88',
  64. Generic.Output: '#d8dee9',
  65. Generic.Traceback: '#bf616a',
  66. Error: '#bf616a',
  67. Text: '#d8dee9',
  68. }
  69. class NordDarkerStyle(Style):
  70. """
  71. Pygments version of a darker "nord" theme by Arctic Ice Studio
  72. """
  73. name = 'nord-darker'
  74. line_number_color = "#D8DEE9"
  75. line_number_background_color = "#242933"
  76. line_number_special_color = "#242933"
  77. line_number_special_background_color = "#D8DEE9"
  78. background_color = "#242933"
  79. highlight_color = "#3B4252"
  80. styles = {
  81. Token: "#d8dee9",
  82. Whitespace: '#d8dee9',
  83. Punctuation: '#eceff4',
  84. Comment: 'italic #616e87',
  85. Comment.Preproc: '#5e81ac',
  86. Keyword: 'bold #81a1c1',
  87. Keyword.Pseudo: 'nobold #81a1c1',
  88. Keyword.Type: 'nobold #81a1c1',
  89. Operator: 'bold #81a1c1',
  90. Operator.Word: 'bold #81a1c1',
  91. Name: '#d8dee9',
  92. Name.Builtin: '#81a1c1',
  93. Name.Function: '#88c0d0',
  94. Name.Class: '#8fbcbb',
  95. Name.Namespace: '#8fbcbb',
  96. Name.Exception: '#bf616a',
  97. Name.Variable: '#d8dee9',
  98. Name.Constant: '#8fbcbb',
  99. Name.Entity: '#d08770',
  100. Name.Attribute: '#8fbcbb',
  101. Name.Tag: '#81a1c1',
  102. Name.Decorator: '#d08770',
  103. String: '#a3be8c',
  104. String.Doc: '#616e87',
  105. String.Interpol: '#a3be8c',
  106. String.Escape: '#ebcb8b',
  107. String.Regex: '#ebcb8b',
  108. String.Symbol: '#a3be8c',
  109. String.Other: '#a3be8c',
  110. Number: '#b48ead',
  111. Generic.Heading: 'bold #88c0d0',
  112. Generic.Subheading: 'bold #88c0d0',
  113. Generic.Deleted: '#bf616a',
  114. Generic.Inserted: '#a3be8c',
  115. Generic.Error: '#bf616a',
  116. Generic.Emph: 'italic',
  117. Generic.Strong: 'bold',
  118. Generic.Prompt: 'bold #616e88',
  119. Generic.Output: '#d8dee9',
  120. Generic.Traceback: '#bf616a',
  121. Error: '#bf616a',
  122. Text: '#d8dee9',
  123. }