|
6 | 6 | Matplotlib recognizes the following formats to specify a color:
|
7 | 7 |
|
8 | 8 | 1) an RGB or RGBA tuple of float values in ``[0, 1]`` (e.g. ``(0.1, 0.2, 0.5)``
|
9 |
| - or ``(0.1, 0.2, 0.5, 0.3)``). RGBA is short for Red, Green, Blue, Alpha; |
| 9 | + or ``(0.1, 0.2, 0.5, 0.3)``). RGBA is short for Red, Green, Blue, Alpha; |
10 | 10 | 2) a hex RGB or RGBA string (e.g., ``'#0F0F0F'`` or ``'#0F0F0F0F'``);
|
11 | 11 | 3) a string representation of a float value in ``[0, 1]`` inclusive for gray
|
12 | 12 | level (e.g., ``'0.5'``);
|
13 | 13 | 4) a single letter string, i.e. one of
|
14 |
| - ``{'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'}``; |
| 14 | + ``{'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'}``, which are short-hand notations |
| 15 | + for shades of blue, green, red, cyan, magenta, yellow, black, and white; |
15 | 16 | 5) a X11/CSS4 ("html") color name, e.g. ``"blue"``;
|
16 | 17 | 6) a name from the `xkcd color survey <https://xkcd.com/color/rgb/>`__,
|
17 | 18 | prefixed with ``'xkcd:'`` (e.g., ``'xkcd:sky blue'``);
|
18 | 19 | 7) a "Cn" color spec, i.e. ``'C'`` followed by a number, which is an index into
|
19 | 20 | the default property cycle (:rc:`axes.prop_cycle`); the indexing is intended
|
20 | 21 | to occur at rendering time, and defaults to black if the cycle does not
|
21 | 22 | include color.
|
22 |
| -8) one of ``{'tab:blue', 'tab:orange', 'tab:green', |
23 |
| - 'tab:red', 'tab:purple', 'tab:brown', 'tab:pink', |
24 |
| - 'tab:gray', 'tab:olive', 'tab:cyan'}`` which are the Tableau Colors from the |
25 |
| - 'tab10' categorical palette (which is the default color cycle); |
| 23 | +8) one of ``{'tab:blue', 'tab:orange', 'tab:green', 'tab:red', 'tab:purple', |
| 24 | + 'tab:brown', 'tab:pink', 'tab:gray', 'tab:olive', 'tab:cyan'}`` which are |
| 25 | + the Tableau Colors from the 'tab10' categorical palette (which is the |
| 26 | + default color cycle); |
26 | 27 |
|
27 | 28 | For more information on colors in matplotlib see
|
28 | 29 |
|
|
0 commit comments