summaryrefslogtreecommitdiff
path: root/pygments/styles
diff options
context:
space:
mode:
authorflywire <flywire0@gmail.com>2022-07-15 18:59:22 +1000
committerGitHub <noreply@github.com>2022-07-15 10:59:22 +0200
commitc6cd51f4da1952f920a43405d2a5d9d88771c87f (patch)
tree99fa10533d2fcd4c44d2b688213da95aa76bb553 /pygments/styles
parent2ebc5eaa28edeb89efc3324e0e82e10c57b9b6e0 (diff)
downloadpygments-git-c6cd51f4da1952f920a43405d2a5d9d88771c87f.tar.gz
Add StarOfficeStyle (#2168)
StarOffice style is a theme used in the user interface and carries through to OpenOffice and LibreOffice, and the documentation. Reference: * [Color Config Entry](https://github.com/LibreOffice/core/blob/master/svtools/source/config/colorcfg.cxx#L447-L453) * [Color Types](https://github.com/LibreOffice/core/blob/e4a57dcdabc9ae7d381025e008b90635c1b7b10c/include/tools/color.hxx#L448) Co-authored-by: Jean Abou-Samra <jean@abou-samra.fr>
Diffstat (limited to 'pygments/styles')
-rw-r--r--pygments/styles/__init__.py1
-rw-r--r--pygments/styles/staroffice.py26
2 files changed, 27 insertions, 0 deletions
diff --git a/pygments/styles/__init__.py b/pygments/styles/__init__.py
index 7d72ceba..d9f060e4 100644
--- a/pygments/styles/__init__.py
+++ b/pygments/styles/__init__.py
@@ -48,6 +48,7 @@ STYLE_MAP = {
'solarized-dark': 'solarized::SolarizedDarkStyle',
'solarized-light': 'solarized::SolarizedLightStyle',
'sas': 'sas::SasStyle',
+ 'staroffice' : 'staroffice::StarofficeStyle',
'stata': 'stata_light::StataLightStyle',
'stata-light': 'stata_light::StataLightStyle',
'stata-dark': 'stata_dark::StataDarkStyle',
diff --git a/pygments/styles/staroffice.py b/pygments/styles/staroffice.py
new file mode 100644
index 00000000..6589c1bc
--- /dev/null
+++ b/pygments/styles/staroffice.py
@@ -0,0 +1,26 @@
+"""
+ pygments.styles.staroffice
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ Style similar to StarOffice style, also in OpenOffice and LibreOffice.
+
+ :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+"""
+
+from pygments.style import Style
+from pygments.token import Comment, Error, Literal, Name, Token
+
+
+class StarofficeStyle(Style):
+ """
+ Style similar to StarOffice style, also in OpenOffice and LibreOffice.
+ """
+
+ styles = {
+ Token: '#000080', # Blue
+ Comment: '#696969', # DimGray
+ Error: '#800000', # Maroon
+ Literal: '#EE0000', # Red
+ Name: '#008000', # Green
+ }