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