atsphinx-color-text

Overview

This is Sphinx extension to render colored-text by HTML builder.

Getting started

Thi is published on PyPI. You can install by pip command.

pip install atsphinx-color-text

Insert extension into your conf.py to enable it.

extensions = [
    "atsphinx.color_text",
]

Usage

You can use this very easy. Write color:~ role into your reStructuredText source.

Example

sphinx-revealjs is presentation library for
Pythonista using reStructuredText and :color:red:`Sphinx`.

Builder generates html from this source.

sphinx-revealjs is presentation library for Pythonista using reStructuredText and Sphinx.

Supporting colors

atsphinx-color-text refers Standard colors from MDN to implement named color roles.

role

color code

:color:black:

#000000

:color:silver:

#c0c0c0

:color:gray:

#808080

:color:white:

#ffffff

:color:maroon:

#800000

:color:red:

#ff0000

:color:purple:

#800080

:color:fuchsia:

#ff00ff

:color:green:

#008000

:color:lime:

#00ff00

:color:olive:

#808000

:color:yellow:

#ffff00

:color:navy:

#000080

:color:blue:

#0000ff

:color:teal:

#008080

:color:aqua:

#00ffff