|
32 | 32 | "#rrggbb" format (`to_hex`), and a sequence of colors to an (n, 4)
|
33 | 33 | RGBA array (`to_rgba_array`). Caching is used for efficiency.
|
34 | 34 |
|
35 |
| -Matplotlib recognizes the following formats to specify a color: |
36 |
| -
|
37 |
| -* an RGB or RGBA (red, green, blue, alpha) tuple of float values in closed |
38 |
| - interval ``[0, 1]`` (e.g., ``(0.1, 0.2, 0.5)`` or ``(0.1, 0.2, 0.5, 0.3)``); |
39 |
| -* a hex RGB or RGBA string (e.g., ``'#0f0f0f'`` or ``'#0f0f0f80'``; |
40 |
| - case-insensitive); |
41 |
| -* a shorthand hex RGB or RGBA string, equivalent to the hex RGB or RGBA |
42 |
| - string obtained by duplicating each character, (e.g., ``'#abc'``, equivalent |
43 |
| - to ``'#aabbcc'``, or ``'#abcd'``, equivalent to ``'#aabbccdd'``; |
44 |
| - case-insensitive); |
45 |
| -* a string representation of a float value in ``[0, 1]`` inclusive for gray |
46 |
| - level (e.g., ``'0.5'``); |
47 |
| -* one of the characters ``{'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'}``, which |
48 |
| - are short-hand notations for shades of blue, green, red, cyan, magenta, |
49 |
| - yellow, black, and white. Note that the colors ``'g', 'c', 'm', 'y'`` do not |
50 |
| - coincide with the X11/CSS4 colors. Their particular shades were chosen for |
51 |
| - better visibility of colored lines against typical backgrounds. |
52 |
| -* a X11/CSS4 color name (case-insensitive); |
53 |
| -* a name from the `xkcd color survey`_, prefixed with ``'xkcd:'`` (e.g., |
54 |
| - ``'xkcd:sky blue'``; case insensitive); |
55 |
| -* one of the Tableau Colors from the 'T10' categorical palette (the default |
56 |
| - color cycle): ``{'tab:blue', 'tab:orange', 'tab:green', 'tab:red', |
57 |
| - 'tab:purple', 'tab:brown', 'tab:pink', 'tab:gray', 'tab:olive', 'tab:cyan'}`` |
58 |
| - (case-insensitive); |
59 |
| -* a "CN" color spec, i.e. 'C' followed by a number, which is an index into the |
60 |
| - default property cycle (:rc:`axes.prop_cycle`); the indexing is intended to |
61 |
| - occur at rendering time, and defaults to black if the cycle does not include |
62 |
| - color. |
| 35 | +Colors that Matplotlib recognizes are listed at |
| 36 | +:doc:`/tutorials/colors/colors`. |
63 | 37 |
|
64 | 38 | .. _palettable: https://jiffyclub.github.io/palettable/
|
65 | 39 | .. _xkcd color survey: https://xkcd.com/color/rgb/
|
|
0 commit comments