File tree 3 files changed +25
-10
lines changed
3 files changed +25
-10
lines changed Original file line number Diff line number Diff line change 4
4
:alt: CI status image
5
5
:target: https://github.com/ubernostrum/webcolors/actions?query=workflow%3ACI
6
6
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.
8
9
9
10
Support is included for normalizing and converting between the
10
11
following formats (RGB colorspace only; conversion to/from HSL can be
@@ -30,7 +31,7 @@ For example:
30
31
31
32
Implementations are also provided for the HTML5 color parsing and
32
33
serialization algorithms. For example, parsing the infamous
33
- "chucknorris" string into an rgb() triplet:
34
+ "chucknorris" string into an `` rgb() `` triplet:
34
35
35
36
.. code-block :: python
36
37
Original file line number Diff line number Diff line change 3
3
.. _contents :
4
4
5
5
6
- Module contents
7
- ===============
6
+ API reference
7
+ =============
8
8
9
9
The contents of the ``webcolors `` module fall into five categories:
10
10
Original file line number Diff line number Diff line change 1
1
webcolors |release |
2
2
===================
3
3
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.
7
6
8
7
Support is included for normalizing and converting between the following
9
8
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
19
18
20
19
* Percentage ``rgb() `` triplet
21
20
22
- For example::
21
+ For example:
22
+
23
+ .. code-block :: python
23
24
24
25
>> > import webcolors
25
26
>> > webcolors.hex_to_name(" #daa520" )
26
27
' goldenrod'
27
28
28
29
Implementations are also provided for the HTML5 color parsing and serialization
29
30
algorithms. For example, parsing the infamous "chucknorris" string into an
30
- ``rgb() `` triplet::
31
+ ``rgb() `` triplet:
32
+
33
+ .. code-block :: python
31
34
32
35
>> > import webcolors
33
36
>> > webcolors.html5_parse_legacy_color(" chucknorris" )
@@ -38,13 +41,24 @@ Documentation contents
38
41
----------------------
39
42
40
43
.. toctree ::
44
+ :caption: Getting started
41
45
:maxdepth: 1
42
46
43
47
install
48
+
49
+ .. toctree ::
50
+ :caption: Reference
51
+ :maxdepth: 1
52
+
44
53
colors
45
54
conventions
46
55
contents
47
56
conformance
57
+
58
+ .. toctree ::
59
+ :caption: Other documentation
60
+ :maxdepth: 1
61
+
48
62
changelog
49
63
faq
50
64
@@ -55,4 +69,4 @@ Documentation contents
55
69
* `CSS1: Color units <http://www.w3.org/TR/CSS1/#color-units >`_
56
70
* `CSS2: Colors <http://www.w3.org/TR/CSS2/syndata.html#color-units >`_
57
71
* `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 >`_
You can’t perform that action at this time.
0 commit comments