Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b93bd5d

Browse files
committed
WIP color docs
1 parent 9feeb9e commit b93bd5d

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

doc/users/beginner.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ Beginner's Guide
2020
legend_guide.rst
2121
annotations_guide.rst
2222
screenshots.rst
23+
colors.rst
2324
colormaps.rst
2425
colormapnorms.rst
25-
26-
27-

doc/users/colors.rst

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.. _colors:
2+
3+
*****************
4+
Specifying Colors
5+
*****************
6+
7+
In almost all places in matplotlib where a color can be specified by the user it can be provided as:
8+
9+
* ``(r, g, b)`` tuples
10+
* ``(r, g, b, a)`` tuples
11+
* hex string, ex ``#OFOFOF``
12+
* float value between [0, 1] for gray level
13+
* valid css4/X11 name
14+
* valid name from the `XKCD color survey <http://blog.xkcd.com/2010/05/03/color-survey-results/>`__ This names maybe
15+
prefixed by ``'XKCD'`` as the css4 names have priority
16+
* One of ``{'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'}``
17+
18+
Internally, we are moving to storing all colors as RGBA quadruples.
19+
20+
Name clash between CSS4/X11 and XKCD
21+
------------------------------------

0 commit comments

Comments
 (0)