Skip to content

Commit b014e65

Browse files
committed
Clean up some documentation.
1 parent 71d0256 commit b014e65

File tree

3 files changed

+25
-10
lines changed

3 files changed

+25
-10
lines changed

README.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
:alt: CI status image
55
:target: https://github.com/ubernostrum/webcolors/actions?query=workflow%3ACI
66

7-
``webcolors`` is a module for working with HTML/CSS color definitions.
7+
``webcolors`` is a module for working with and converting between the
8+
various HTML/CSS color formats.
89

910
Support is included for normalizing and converting between the
1011
following formats (RGB colorspace only; conversion to/from HSL can be
@@ -30,7 +31,7 @@ For example:
3031
3132
Implementations are also provided for the HTML5 color parsing and
3233
serialization algorithms. For example, parsing the infamous
33-
"chucknorris" string into an rgb() triplet:
34+
"chucknorris" string into an ``rgb()`` triplet:
3435

3536
.. code-block:: python
3637

docs/contents.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
.. _contents:
44

55

6-
Module contents
7-
===============
6+
API reference
7+
=============
88

99
The contents of the ``webcolors`` module fall into five categories:
1010

docs/index.rst

+20-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
webcolors |release|
22
===================
33

4-
This module provides utility functions for working with the color names and
5-
color value formats defined by the HTML and CSS specifications for use in
6-
documents on the web.
4+
``webcolors`` is a module for working with and converting between the various
5+
HTML/CSS color formats.
76

87
Support is included for normalizing and converting between the following
98
formats (RGB colorspace only; conversion to/from HSL can be handled by the
@@ -19,15 +18,19 @@ formats (RGB colorspace only; conversion to/from HSL can be handled by the
1918

2019
* Percentage ``rgb()`` triplet
2120

22-
For example::
21+
For example:
22+
23+
.. code-block:: python
2324
2425
>>> import webcolors
2526
>>> webcolors.hex_to_name("#daa520")
2627
'goldenrod'
2728
2829
Implementations are also provided for the HTML5 color parsing and serialization
2930
algorithms. For example, parsing the infamous "chucknorris" string into an
30-
``rgb()`` triplet::
31+
``rgb()`` triplet:
32+
33+
.. code-block:: python
3134
3235
>>> import webcolors
3336
>>> webcolors.html5_parse_legacy_color("chucknorris")
@@ -38,13 +41,24 @@ Documentation contents
3841
----------------------
3942

4043
.. toctree::
44+
:caption: Getting started
4145
:maxdepth: 1
4246

4347
install
48+
49+
.. toctree::
50+
:caption: Reference
51+
:maxdepth: 1
52+
4453
colors
4554
conventions
4655
contents
4756
conformance
57+
58+
.. toctree::
59+
:caption: Other documentation
60+
:maxdepth: 1
61+
4862
changelog
4963
faq
5064

@@ -55,4 +69,4 @@ Documentation contents
5569
* `CSS1: Color units <http://www.w3.org/TR/CSS1/#color-units>`_
5670
* `CSS2: Colors <http://www.w3.org/TR/CSS2/syndata.html#color-units>`_
5771
* `CSS3 color module <http://www.w3.org/TR/css3-color/>`_
58-
* `HTML5: Colors <http://www.w3.org/TR/html5/infrastructure.html#colors>`_
72+
* `HTML5: Colors <https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#colours>`_

0 commit comments

Comments
 (0)