Colors#

This theme specifies color variables for the primary and secondary colors (--pst-color-primary and --pst-color-secondary, respectively). These are meant to complement one another visually across the theme, if you modify these, choose colors that look good when paired with one another. There are also several other color variables that control the color for admonitions, links, menu items, etc.

Each color variable has two values, one corresponding to the “light” and one for the “dark” theme. These are used throughout many of the theme elements to define text color, background color, etc.

Here is an overview of the colors available in the theme (change theme mode to switch from light to dark versions).

primary secondary accent success info warning danger background on-background surface on-surface target

This theme uses shadows to convey depth in the light theme mode and opacity in the dark one. It defines 4 color variables that help build overlays in your documentation.

  • background: color of the back-most surface of the documentation

  • on-background elements that are set on top of this background (e.g. the header navbar on dark mode).

  • surface elements set on the background with a light-grey color in the light theme mode. This color has been kept in the dark theme (e.g. code-block directives).

  • on-surface elements that are on top of surface elements (e.g. sidebar directives).

The following image should help you understand these overlays:

background

on-background

surface

on-surface

Admonitions#

Generic Admonition

Generic admonition needs content apparently

Attention

attention

Caution

caution

Danger

danger

Error

error

Hint

hint

Important

important

Note

note

Tip

tip

Warning

warning

Snippets#

Documentation index and Module index.

Some code:

"""
Parameters
----------
x : `type`
    Description of parameter x.
"""
import numpy as np

def func(x):
    return np.mean(x)

# This is a comment
return func

It’s good to have your upstream remote have a scary name [1], to remind you that it’s a read-write remote:

$ git remote add upstream-rw git@github.com:sunpy/sunpy.git
$ git fetch upstream-rw

:func: numpy.mean()

:meth: numpy.mean()

:class: numpy.mean

Normal numpy.mean

:func: numpy.ndarray.mean()

:meth: numpy.ndarray.mean()

:class: numpy.ndarray.mean

Normal numpy.ndarray.mean

Sometimes you need a URL: bbc.com

Contributing to sunraster