From 0ba6a9c7ed5411c2d1f5eccef14bde9114589e4e Mon Sep 17 00:00:00 2001 From: Daniel Vilar Date: Mon, 14 Dec 2020 14:34:53 +0000 Subject: [PATCH 1/4] added dracula theme style --- pygments/styles/dracula.py | 110 +++++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 pygments/styles/dracula.py diff --git a/pygments/styles/dracula.py b/pygments/styles/dracula.py new file mode 100644 index 0000000000..ea84a73257 --- /dev/null +++ b/pygments/styles/dracula.py @@ -0,0 +1,110 @@ +# -*- coding: utf-8 -*- +""" + Dracula Theme v1.2.5 + + https://github.com/zenorocha/dracula-theme + + Copyright 2016, All rights reserved + + Code licensed under the MIT license + http://zenorocha.mit-license.org + + :author Rob G + :author Chris Bracco + :author Zeno Rocha +""" + +from pygments.style import Style +from pygments.token import Keyword, Name, Comment, String, Error, \ + Literal, Number, Operator, Other, Punctuation, Text, Generic, \ + Whitespace + +class DraculaStyle(Style): + + background_color = "#282a36" + default_style = "" + + styles = { + Comment: "#6272a4", + Comment.Hashbang: "#6272a4", + Comment.Multiline: "#6272a4", + Comment.Preproc: "#ff79c6", + Comment.Single: "#6272a4", + Comment.Special: "#6272a4", + + Generic: "#f8f8f2", + Generic.Deleted: "#8b080b", + Generic.Emph: "#f8f8f2 underline", + Generic.Error: "#f8f8f2", + Generic.Heading: "#f8f8f2 bold", + Generic.Inserted: "#f8f8f2 bold", + Generic.Output: "#44475a", + Generic.Prompt: "#f8f8f2", + Generic.Strong: "#f8f8f2", + Generic.Subheading: "#f8f8f2 bold", + Generic.Traceback: "#f8f8f2", + + Error: "#f8f8f2", + + Keyword: "#ff79c6", + Keyword.Constant: "#ff79c6", + Keyword.Declaration: "#8be9fd italic", + Keyword.Namespace: "#ff79c6", + Keyword.Pseudo: "#ff79c6", + Keyword.Reserved: "#ff79c6", + Keyword.Type: "#8be9fd", + + Literal: "#f8f8f2", + Literal.Date: "#f8f8f2", + + Name: "#f8f8f2", + Name.Attribute: "#50fa7b", + Name.Builtin: "#8be9fd italic", + Name.Builtin.Pseudo: "#f8f8f2", + Name.Class: "#50fa7b", + Name.Constant: "#f8f8f2", + Name.Decorator: "#f8f8f2", + Name.Entity: "#f8f8f2", + Name.Exception: "#f8f8f2", + Name.Function: "#50fa7b", + Name.Label: "#8be9fd italic", + Name.Namespace: "#f8f8f2", + Name.Other: "#f8f8f2", + Name.Tag: "#ff79c6", + Name.Variable: "#8be9fd italic", + Name.Variable.Class: "#8be9fd italic", + Name.Variable.Global: "#8be9fd italic", + Name.Variable.Instance: "#8be9fd italic", + + Number: "#bd93f9", + Number.Bin: "#bd93f9", + Number.Float: "#bd93f9", + Number.Hex: "#bd93f9", + Number.Integer: "#bd93f9", + Number.Integer.Long: "#bd93f9", + Number.Oct: "#bd93f9", + + Operator: "#ff79c6", + Operator.Word: "#ff79c6", + + Other: "#f8f8f2", + + Punctuation: "#f8f8f2", + + String: "#f1fa8c", + String.Backtick: "#f1fa8c", + String.Char: "#f1fa8c", + String.Doc: "#f1fa8c", + String.Double: "#f1fa8c", + String.Escape: "#f1fa8c", + String.Heredoc: "#f1fa8c", + String.Interpol: "#f1fa8c", + String.Other: "#f1fa8c", + String.Regex: "#f1fa8c", + String.Single: "#f1fa8c", + String.Symbol: "#f1fa8c", + + Text: "#f8f8f2", + + Whitespace: "#f8f8f2" + } From 9839f5fb09df1b39e7ca97a919ea8bf36d01a7d3 Mon Sep 17 00:00:00 2001 From: Daniel Vilar Date: Mon, 14 Dec 2020 14:36:27 +0000 Subject: [PATCH 2/4] added dracula style to init --- pygments/styles/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pygments/styles/__init__.py b/pygments/styles/__init__.py index e089f5c8bc..771bc658af 100644 --- a/pygments/styles/__init__.py +++ b/pygments/styles/__init__.py @@ -51,6 +51,7 @@ 'stata-light': 'stata_light::StataLightStyle', 'stata-dark': 'stata_dark::StataDarkStyle', 'inkpot': 'inkpot::InkPotStyle', + 'dracula': 'draculla:DraculaStyle' } From 7193a22861ef357a90ed08389f58963fd0a0c2d2 Mon Sep 17 00:00:00 2001 From: Daniel Vilar Date: Mon, 14 Dec 2020 14:37:00 +0000 Subject: [PATCH 3/4] corrected misspell --- pygments/styles/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygments/styles/__init__.py b/pygments/styles/__init__.py index 771bc658af..515a5ffbfa 100644 --- a/pygments/styles/__init__.py +++ b/pygments/styles/__init__.py @@ -51,7 +51,7 @@ 'stata-light': 'stata_light::StataLightStyle', 'stata-dark': 'stata_dark::StataDarkStyle', 'inkpot': 'inkpot::InkPotStyle', - 'dracula': 'draculla:DraculaStyle' + 'dracula': 'dracula:DraculaStyle' } From ae971577911d52d0b276edffa082a392fe8b028a Mon Sep 17 00:00:00 2001 From: Daniel Vilar Date: Mon, 14 Dec 2020 14:44:26 +0000 Subject: [PATCH 4/4] Update __init__.py --- pygments/styles/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygments/styles/__init__.py b/pygments/styles/__init__.py index 515a5ffbfa..e08cd84f5d 100644 --- a/pygments/styles/__init__.py +++ b/pygments/styles/__init__.py @@ -51,7 +51,7 @@ 'stata-light': 'stata_light::StataLightStyle', 'stata-dark': 'stata_dark::StataDarkStyle', 'inkpot': 'inkpot::InkPotStyle', - 'dracula': 'dracula:DraculaStyle' + 'dracula': 'dracula::DraculaStyle' }