GitHub Dark Theme Pygments Style
-
class sphinx_github_style.github_style.GitHubStyleView on GitHub
View Source Code
class GitHubStyle(Style): """A Pygments style similar to GitHub's pretty lights dark theme""" background_color = "#0d1117" default_style = '' styles = { Whitespace: "#f0f6fc", Comment: pl["syntax-comment"], Comment.Hashbang: pl["syntax-comment"], Comment.Multiline: pl["syntax-comment"], Comment.Preproc: pl["syntax-comment"], Comment.Single: pl["syntax-comment"], Comment.Special: pl["syntax-comment"], Generic: "#f0f6fc", Generic.Deleted: "#8b080b", Generic.Emph: "#f8f8f2 underline", Generic.Error: "#f8f8f2", Generic.Heading: "#f8f8f2 bold", Generic.Inserted: "#f8f8f2 bold", Generic.Output: "#adaeb6", Generic.Prompt: "#f8f8f2", Generic.Strong: "#f8f8f2", Generic.Subheading: "#f8f8f2 bold", Generic.Traceback: "#f8f8f2", Error: "#f8f8f2", Keyword: pl["syntax-keyword"], Keyword.Constant: pl["syntax-constant"], # Ex. None Keyword.Declaration: pl["syntax-keyword"], Keyword.Namespace: pl["syntax-keyword"], Keyword.Pseudo: pl["syntax-entity"], Keyword.Reserved: pl["syntax-constant"], Keyword.Type: pl["syntax-constant"], Literal: "#f8f8f2", Literal.Date: "#f8f8f2", Literal.String.Affix: "#f8f8f2", Literal.String.Doc: "#f8f8f2", Literal.String.Double: "#f8f8f2", Literal.String.Interpol: "#f8f8f2", Literal.String.Single: "#f8f8f2", Name: pl["syntax-markup-bold"], Name.Variable: pl["syntax-markup-bold"], Name.Attribute: pl["syntax-markup-bold"], Name.Builtin.Pseudo: pl["syntax-markup-bold"], # Ex. self Name.Builtin: pl["syntax-entity"], # Ex. print() Name.Class: pl["syntax-variable"], Name.Constant: pl["syntax-constant"], Name.Decorator: pl["syntax-entity"], Name.Entity: pl["syntax-entity"], Name.Exception: pl["syntax-variable"], Name.Function: pl["syntax-entity"], Name.Function.Magic: pl["syntax-entity"], # Name.Label: "#8be9fd italic", Name.Namespace: pl["syntax-markup-bold"], Name.Other: pl["syntax-markup-bold"], # Name.Other: pl["syntax-variable"], # Name.Tag: "#ff79c6", Name.Variable.Class: pl["syntax-variable"], Name.Variable.Global: pl["syntax-variable"], Name.Variable.Instance: pl["syntax-markup-bold"], Name.Variable.Magic: pl["syntax-markup-bold"], Number: pl["syntax-constant"], Number.Bin: pl["syntax-constant"], Number.Float: pl["syntax-constant"], Number.Hex: pl["syntax-constant"], Number.Integer: pl["syntax-constant"], Number.Integer.Long: pl["syntax-constant"], Number.Oct: pl["syntax-constant"], Operator: pl["syntax-constant"], Operator.Word: pl["syntax-constant"], # Other: "#f8f8f2", Other.Constant: pl["syntax-constant"], Punctuation: "#f8f8f2", Punctuation.Definition.Comment: pl["syntax-comment"], String: pl["syntax-string"], String.Affix: pl["syntax-string"], String.Backtick: pl["syntax-string"], String.Char: pl["syntax-string"], String.Comment: pl["syntax-comment"], String.Doc: pl["syntax-string"], String.Double: pl["syntax-string"], String.Escape: pl["syntax-string"], String.Heredoc: pl["syntax-string"], String.Interpol: pl["syntax-string"], String.Other: pl["syntax-string"], String.Regex: pl["syntax-string"], String.Single: pl["syntax-string"], String.Symbol: pl["syntax-string"], Text: pl["syntax-markup-bold"], } A Pygments style similar to GitHub’s pretty lights dark theme
- background_color = '#0d1117'
overall background color (
None
means transparent)
- default_style = ''
- styles = {Token: '', Token.Comment: '#8b949e', Token.Comment.Hashbang: '#8b949e', Token.Comment.Multiline: '#8b949e', Token.Comment.Preproc: '#8b949e', Token.Comment.PreprocFile: '', Token.Comment.Single: '#8b949e', Token.Comment.Special: '#8b949e', Token.Error: '#f8f8f2', Token.Escape: '', Token.Generic: '#f0f6fc', Token.Generic.Deleted: '#8b080b', Token.Generic.Emph: '#f8f8f2 underline', Token.Generic.EmphStrong: '', Token.Generic.Error: '#f8f8f2', Token.Generic.Heading: '#f8f8f2 bold', Token.Generic.Inserted: '#f8f8f2 bold', Token.Generic.Output: '#adaeb6', Token.Generic.Prompt: '#f8f8f2', Token.Generic.Strong: '#f8f8f2', Token.Generic.Subheading: '#f8f8f2 bold', Token.Generic.Traceback: '#f8f8f2', Token.Keyword: '#ff7b72', Token.Keyword.Constant: '#79c0ff', Token.Keyword.Declaration: '#ff7b72', Token.Keyword.Namespace: '#ff7b72', Token.Keyword.Pseudo: '#d2a8ff', Token.Keyword.Reserved: '#79c0ff', Token.Keyword.Type: '#79c0ff', Token.Literal: '#f8f8f2', Token.Literal.Date: '#f8f8f2', Token.Literal.Number: '#79c0ff', Token.Literal.Number.Bin: '#79c0ff', Token.Literal.Number.Float: '#79c0ff', Token.Literal.Number.Hex: '#79c0ff', Token.Literal.Number.Integer: '#79c0ff', Token.Literal.Number.Integer.Long: '#79c0ff', Token.Literal.Number.Oct: '#79c0ff', Token.Literal.String: '#a5d6ff', Token.Literal.String.Affix: '#a5d6ff', Token.Literal.String.Backtick: '#a5d6ff', Token.Literal.String.Char: '#a5d6ff', Token.Literal.String.Comment: '#8b949e', Token.Literal.String.Delimiter: '', Token.Literal.String.Doc: '#a5d6ff', Token.Literal.String.Double: '#a5d6ff', Token.Literal.String.Escape: '#a5d6ff', Token.Literal.String.Heredoc: '#a5d6ff', Token.Literal.String.Interpol: '#a5d6ff', Token.Literal.String.Other: '#a5d6ff', Token.Literal.String.Regex: '#a5d6ff', Token.Literal.String.Single: '#a5d6ff', Token.Literal.String.Symbol: '#a5d6ff', Token.Name: '#e6edf3', Token.Name.Attribute: '#e6edf3', Token.Name.Builtin: '#d2a8ff', Token.Name.Builtin.Pseudo: '#e6edf3', Token.Name.Class: '#ffa657', Token.Name.Constant: '#79c0ff', Token.Name.Decorator: '#d2a8ff', Token.Name.Entity: '#d2a8ff', Token.Name.Exception: '#ffa657', Token.Name.Function: '#d2a8ff', Token.Name.Function.Magic: '#d2a8ff', Token.Name.Label: '', Token.Name.Namespace: '#e6edf3', Token.Name.Other: '#e6edf3', Token.Name.Property: '', Token.Name.Tag: '', Token.Name.Variable: '#e6edf3', Token.Name.Variable.Class: '#ffa657', Token.Name.Variable.Global: '#ffa657', Token.Name.Variable.Instance: '#e6edf3', Token.Name.Variable.Magic: '#e6edf3', Token.Operator: '#79c0ff', Token.Operator.Word: '#79c0ff', Token.Other: '', Token.Other.Constant: '#79c0ff', Token.Punctuation: '#f8f8f2', Token.Punctuation.Definition.Comment: '#8b949e', Token.Punctuation.Marker: '', Token.Text: '#e6edf3', Token.Text.Whitespace: '#f0f6fc'}
Style definitions for individual token types.