summaryrefslogtreecommitdiff
path: root/pygments/styles
diff options
context:
space:
mode:
authorMartin Fischer <martin@push-f.com>2021-11-14 17:47:22 +0100
committerMartin Fischer <martin@push-f.com>2021-11-14 18:27:19 +0100
commitd32154b6ad9631e782a8bb79d83bf3d9dcec3d0e (patch)
tree295224dc806c192c6dc6c8d263972b24650dac0c /pygments/styles
parentc7362079f515826aa063a1e4302a6beb60abe6b7 (diff)
downloadpygments-git-d32154b6ad9631e782a8bb79d83bf3d9dcec3d0e.tar.gz
Add missing colors to dark styles
Some dark styles did not define a color for every token type, resulting in black text (the browser default for text) on dark backgrounds (defined by the styles) unless the web page had some CSS to remedy that like: body { color: white; background: black; } We however don't want the readability of styles to rely on external CSS. Part of #1718. Fixes some unreadable styles reported in #1526.
Diffstat (limited to 'pygments/styles')
-rw-r--r--pygments/styles/gruvbox.py4
-rw-r--r--pygments/styles/monokai.py4
-rw-r--r--pygments/styles/rrt.py3
-rw-r--r--pygments/styles/stata_dark.py6
4 files changed, 10 insertions, 7 deletions
diff --git a/pygments/styles/gruvbox.py b/pygments/styles/gruvbox.py
index ddf05ea9..1077e6d8 100644
--- a/pygments/styles/gruvbox.py
+++ b/pygments/styles/gruvbox.py
@@ -10,7 +10,7 @@
"""
from pygments.style import Style
-from pygments.token import Keyword, Name, Comment, String, Error, \
+from pygments.token import Token, Keyword, Name, Comment, String, Error, \
Number, Operator, Generic
@@ -23,6 +23,8 @@ class GruvboxDarkStyle(Style):
highlight_color = '#ebdbb2'
styles = {
+ Token: '#dddddd',
+
Comment: 'italic #928374',
Comment.PreProc: '#8ec07c',
Comment.Special: 'bold italic #ebdbb2',
diff --git a/pygments/styles/monokai.py b/pygments/styles/monokai.py
index 9d69ec0b..9de82f35 100644
--- a/pygments/styles/monokai.py
+++ b/pygments/styles/monokai.py
@@ -11,7 +11,7 @@
"""
from pygments.style import Style
-from pygments.token import Keyword, Name, Comment, String, Error, Text, \
+from pygments.token import Keyword, Name, Comment, String, Error, Token, \
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
class MonokaiStyle(Style):
@@ -24,7 +24,7 @@ class MonokaiStyle(Style):
styles = {
# No corresponding class for the following:
- Text: "#f8f8f2", # class: ''
+ Token: "#f8f8f2", # class: ''
Whitespace: "", # class: 'w'
Error: "#960050 bg:#1e0010", # class: 'err'
Other: "", # class 'x'
diff --git a/pygments/styles/rrt.py b/pygments/styles/rrt.py
index 455f1d94..0b58152d 100644
--- a/pygments/styles/rrt.py
+++ b/pygments/styles/rrt.py
@@ -9,7 +9,7 @@
"""
from pygments.style import Style
-from pygments.token import Comment, Name, Keyword, String
+from pygments.token import Token, Comment, Name, Keyword, String
class RrtStyle(Style):
@@ -21,6 +21,7 @@ class RrtStyle(Style):
highlight_color = '#0000ff'
styles = {
+ Token: '#dddddd',
Comment: '#00ff00',
Name.Function: '#ffff00',
Name.Variable: '#eedd82',
diff --git a/pygments/styles/stata_dark.py b/pygments/styles/stata_dark.py
index 073f0131..86d23be0 100644
--- a/pygments/styles/stata_dark.py
+++ b/pygments/styles/stata_dark.py
@@ -11,8 +11,8 @@
"""
from pygments.style import Style
-from pygments.token import Keyword, Name, Comment, String, Error, \
- Number, Operator, Whitespace, Generic, Text
+from pygments.token import Token, Keyword, Name, Comment, String, Error, \
+ Number, Operator, Whitespace, Generic
class StataDarkStyle(Style):
@@ -23,9 +23,9 @@ class StataDarkStyle(Style):
highlight_color = "#49483e"
styles = {
+ Token: '#cccccc',
Whitespace: '#bbbbbb',
Error: 'bg:#e3d2d2 #a61717',
- Text: '#cccccc',
String: '#51cc99',
Number: '#4FB8CC',
Operator: '',