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

Skip to content

Commit cd7ed94

Browse files
committed
DOC: Mention shorthand hex RGB(A) in color demo.
cf #15152
1 parent 3b2c517 commit cd7ed94

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

examples/color/color_demo.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,22 @@
88
1) an RGB or RGBA tuple of float values in ``[0, 1]`` (e.g. ``(0.1, 0.2, 0.5)``
99
or ``(0.1, 0.2, 0.5, 0.3)``). RGBA is short for Red, Green, Blue, Alpha;
1010
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
1215
level (e.g., ``'0.5'``);
13-
4) a single letter string, i.e. one of
16+
5) a single letter string, i.e. one of
1417
``{'b', 'g', 'r', 'c', 'm', 'y', 'k', 'w'}``, which are short-hand notations
1518
for shades of blue, green, red, cyan, magenta, yellow, black, and white;
16-
5) a X11/CSS4 ("html") color name, e.g. ``"blue"``;
17-
6) a name from the `xkcd color survey <https://xkcd.com/color/rgb/>`__,
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/>`__,
1821
prefixed with ``'xkcd:'`` (e.g., ``'xkcd:sky blue'``);
19-
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
2023
the default property cycle (:rc:`axes.prop_cycle`); the indexing is intended
2124
to occur at rendering time, and defaults to black if the cycle does not
2225
include color.
23-
8) one of ``{'tab:blue', 'tab:orange', 'tab:green', 'tab:red', 'tab:purple',
26+
9) one of ``{'tab:blue', 'tab:orange', 'tab:green', 'tab:red', 'tab:purple',
2427
'tab:brown', 'tab:pink', 'tab:gray', 'tab:olive', 'tab:cyan'}`` which are
2528
the Tableau Colors from the 'tab10' categorical palette (which is the
2629
default color cycle);

0 commit comments

Comments
 (0)