API reference¶
Autodoc output, so the object-description styling has something real to render.
A Sphinx theme with the look and feel of 2009-era RuneScape.
The visual language (palette, pixel fonts, bevelled borders, stone panels) is
ported from the runescapecn shadcn registry, which is vendored under
vendor/runescapecn in this repository for reference.
Highlighting¶
Pygments styles matching the 2009scape palette.
The colour choices mirror src/components/code-block.tsx in the runescapecn
reference implementation: tags/keywords are RuneScape green, attributes cyan,
strings yellow, comments grey-italic and plain text the familiar interface
orange.
- class sphinx_2009scape_theme.highlighting.Scape2009LightStyle[source]¶
Bases:
StyleParchment-toned variant, used when a light Pygments style is requested.
The theme itself is dark by design, but Sphinx asks for a
defaultPygments style when a page is rendered with a light user agent stylesheet (and some extensions render snippets on a pale surface).- background_color = '#e8dcc0'¶
overall background color (
Nonemeans transparent)
- highlight_color = '#d3c298'¶
highlight background color
- line_number_color = '#6b5a3a'¶
line number font color
- name = '2009scape-light'¶
- styles = {(): '#2a2118', ('Comment',): 'italic #6b5a3a', ('Comment', 'Hashbang'): '', ('Comment', 'Multiline'): '', ('Comment', 'Preproc'): 'noitalic #1f6b1f', ('Comment', 'PreprocFile'): '', ('Comment', 'Single'): '', ('Comment', 'Special'): 'italic bold #6b4a10', ('Error',): 'bg:#f0c0c0 #8b0000', ('Escape',): '', ('Generic',): '', ('Generic', 'Deleted'): 'bg:#f0c0c0 #8b0000', ('Generic', 'Emph'): 'italic', ('Generic', 'EmphStrong'): '', ('Generic', 'Error'): '#8b0000', ('Generic', 'Heading'): 'bold #7a5a10', ('Generic', 'Inserted'): 'bg:#c0e8c0 #1f6b1f', ('Generic', 'Output'): '#6b5a3a', ('Generic', 'Prompt'): 'bold #1f6b1f', ('Generic', 'Strong'): 'bold', ('Generic', 'Subheading'): 'bold #7a5a10', ('Generic', 'Traceback'): '#8b0000', ('Keyword',): 'bold #1f6b1f', ('Keyword', 'Constant'): 'bold #0f5f6b', ('Keyword', 'Declaration'): '', ('Keyword', 'Namespace'): '', ('Keyword', 'Pseudo'): 'nobold #1f6b1f', ('Keyword', 'Reserved'): '', ('Keyword', 'Type'): 'nobold #7a5a10', ('Literal',): '#8a6a00', ('Literal', 'Date'): '', ('Literal', 'Number'): '#0f5f6b', ('Literal', 'Number', 'Bin'): '', ('Literal', 'Number', 'Float'): '', ('Literal', 'Number', 'Hex'): '', ('Literal', 'Number', 'Integer'): '', ('Literal', 'Number', 'Integer', 'Long'): '', ('Literal', 'Number', 'Oct'): '', ('Literal', 'String'): '#8a6a00', ('Literal', 'String', 'Affix'): '', ('Literal', 'String', 'Backtick'): '', ('Literal', 'String', 'Char'): '', ('Literal', 'String', 'Delimiter'): '', ('Literal', 'String', 'Doc'): 'italic #6b5a3a', ('Literal', 'String', 'Double'): '', ('Literal', 'String', 'Escape'): 'bold #0f5f6b', ('Literal', 'String', 'Heredoc'): '', ('Literal', 'String', 'Interpol'): 'bold #0f5f6b', ('Literal', 'String', 'Other'): '', ('Literal', 'String', 'Regex'): '#0f5f6b', ('Literal', 'String', 'Single'): '', ('Literal', 'String', 'Symbol'): '#0f5f6b', ('Name',): '#2a2118', ('Name', 'Attribute'): '#0f5f6b', ('Name', 'Builtin'): '#1f6b1f', ('Name', 'Builtin', 'Pseudo'): '', ('Name', 'Class'): 'bold #7a5a10', ('Name', 'Constant'): '#0f5f6b', ('Name', 'Decorator'): 'bold #8a6a00', ('Name', 'Entity'): '', ('Name', 'Exception'): 'bold #8b0000', ('Name', 'Function'): '#7a5a10', ('Name', 'Function', 'Magic'): '', ('Name', 'Label'): '', ('Name', 'Namespace'): 'bold #7a5a10', ('Name', 'Other'): '', ('Name', 'Property'): '', ('Name', 'Tag'): 'bold #1f6b1f', ('Name', 'Variable'): '#2a2118', ('Name', 'Variable', 'Class'): '', ('Name', 'Variable', 'Global'): '', ('Name', 'Variable', 'Instance'): '', ('Name', 'Variable', 'Magic'): '', ('Operator',): '#5a4a35', ('Operator', 'Word'): 'bold #1f6b1f', ('Other',): '#2a2118', ('Punctuation',): '#5a4a35', ('Punctuation', 'Marker'): '', ('Text',): '#2a2118', ('Text', 'Whitespace'): ''}¶
Style definitions for individual token types.
- class sphinx_2009scape_theme.highlighting.Scape2009Style[source]¶
Bases:
StyleDark code highlighting for the 2009scape theme.
- background_color = '#111111'¶
overall background color (
Nonemeans transparent)
- highlight_color = '#3a3320'¶
highlight background color
- line_number_background_color = '#0b0b0b'¶
line number background color
- line_number_color = '#7a7a7a'¶
line number font color
- line_number_special_background_color = '#c9a961'¶
special line number background color
- line_number_special_color = '#000000'¶
special line number font color
- name = '2009scape'¶
- styles = {(): '#ff981f', ('Comment',): 'italic #7a7a7a', ('Comment', 'Hashbang'): '', ('Comment', 'Multiline'): '', ('Comment', 'Preproc'): 'noitalic #00ff00', ('Comment', 'PreprocFile'): '', ('Comment', 'Single'): '', ('Comment', 'Special'): 'italic bold #c9a961', ('Error',): 'bg:#3a0000 #ff0000', ('Escape',): '', ('Generic',): '', ('Generic', 'Deleted'): 'bg:#2a0000 #ff0000', ('Generic', 'Emph'): 'italic', ('Generic', 'EmphStrong'): '', ('Generic', 'Error'): '#ff0000', ('Generic', 'Heading'): 'bold #c9a961', ('Generic', 'Inserted'): 'bg:#002a00 #00ff00', ('Generic', 'Output'): '#7a7a7a', ('Generic', 'Prompt'): 'bold #00ff00', ('Generic', 'Strong'): 'bold', ('Generic', 'Subheading'): 'bold #c9a961', ('Generic', 'Traceback'): '#ff0000', ('Keyword',): 'bold #00ff00', ('Keyword', 'Constant'): 'bold #00ffff', ('Keyword', 'Declaration'): '', ('Keyword', 'Namespace'): '', ('Keyword', 'Pseudo'): 'nobold #00ff00', ('Keyword', 'Reserved'): '', ('Keyword', 'Type'): 'nobold #c9a961', ('Literal',): '#ffeb3b', ('Literal', 'Date'): '', ('Literal', 'Number'): '#00ffff', ('Literal', 'Number', 'Bin'): '', ('Literal', 'Number', 'Float'): '', ('Literal', 'Number', 'Hex'): '', ('Literal', 'Number', 'Integer'): '', ('Literal', 'Number', 'Integer', 'Long'): '', ('Literal', 'Number', 'Oct'): '', ('Literal', 'String'): '#ffeb3b', ('Literal', 'String', 'Affix'): '', ('Literal', 'String', 'Backtick'): '', ('Literal', 'String', 'Char'): '', ('Literal', 'String', 'Delimiter'): '', ('Literal', 'String', 'Doc'): 'italic #7a7a7a', ('Literal', 'String', 'Double'): '', ('Literal', 'String', 'Escape'): 'bold #00ffff', ('Literal', 'String', 'Heredoc'): '', ('Literal', 'String', 'Interpol'): 'bold #00ffff', ('Literal', 'String', 'Other'): '', ('Literal', 'String', 'Regex'): '#00ffff', ('Literal', 'String', 'Single'): '', ('Literal', 'String', 'Symbol'): '#00ffff', ('Name',): '#ff981f', ('Name', 'Attribute'): '#00ffff', ('Name', 'Builtin'): '#00ff00', ('Name', 'Builtin', 'Pseudo'): 'italic #00ff00', ('Name', 'Class'): 'bold #c9a961', ('Name', 'Constant'): '#00ffff', ('Name', 'Decorator'): 'bold #ffeb3b', ('Name', 'Entity'): '#00ffff', ('Name', 'Exception'): 'bold #ff0000', ('Name', 'Function'): '#c9a961', ('Name', 'Function', 'Magic'): 'bold #c9a961', ('Name', 'Label'): '#00ffff', ('Name', 'Namespace'): 'bold #c9a961', ('Name', 'Other'): '', ('Name', 'Property'): '', ('Name', 'Tag'): 'bold #00ff00', ('Name', 'Variable'): '#ff981f', ('Name', 'Variable', 'Class'): '', ('Name', 'Variable', 'Global'): '', ('Name', 'Variable', 'Instance'): '', ('Name', 'Variable', 'Magic'): 'bold #ff981f', ('Operator',): '#7a7a7a', ('Operator', 'Word'): 'bold #00ff00', ('Other',): '#ff981f', ('Punctuation',): '#7a7a7a', ('Punctuation', 'Marker'): '', ('Text',): '#ff981f', ('Text', 'Whitespace'): ''}¶
Style definitions for individual token types.