|
1 | 1 | # ***************************************************************************** |
2 | 2 | # |
3 | 3 | # Part of the py5 library |
4 | | -# Copyright (C) 2020-2025 Jim Schmitz |
| 4 | +# Copyright (C) 2020-2026 Jim Schmitz |
5 | 5 | # |
6 | 6 | # This library is free software: you can redistribute it and/or modify it |
7 | 7 | # under the terms of the GNU Lesser General Public License as published by |
@@ -640,6 +640,14 @@ def color(self, c: int, /) -> int: |
640 | 640 | Note that when using hexadecimal notation, it is not necessary to use `color()`, |
641 | 641 | as in: `c = 0x006699` |
642 | 642 |
|
| 643 | + If you have matplotlib installed, you can create colors using matplotlib's |
| 644 | + named colors by passing a color name as a string to this method. See the list of |
| 645 | + named colors in the Matplotlib Named Colors reference. For more information, see |
| 646 | + the Matplotlib Named Colors section in the All About Colors integration |
| 647 | + documentation page. There's also other color related information on that page; |
| 648 | + go read it to learn more about various ways py5 makes it easy for you to work |
| 649 | + with color. |
| 650 | + |
643 | 651 | This method is the same as `color()` but linked to a `Py5Graphics` object. To |
644 | 652 | see example code for how it can be used, see `color()`.""" |
645 | 653 | pass |
@@ -727,6 +735,14 @@ def color(self, c: int, alpha: float, /) -> int: |
727 | 735 | Note that when using hexadecimal notation, it is not necessary to use `color()`, |
728 | 736 | as in: `c = 0x006699` |
729 | 737 |
|
| 738 | + If you have matplotlib installed, you can create colors using matplotlib's |
| 739 | + named colors by passing a color name as a string to this method. See the list of |
| 740 | + named colors in the Matplotlib Named Colors reference. For more information, see |
| 741 | + the Matplotlib Named Colors section in the All About Colors integration |
| 742 | + documentation page. There's also other color related information on that page; |
| 743 | + go read it to learn more about various ways py5 makes it easy for you to work |
| 744 | + with color. |
| 745 | + |
730 | 746 | This method is the same as `color()` but linked to a `Py5Graphics` object. To |
731 | 747 | see example code for how it can be used, see `color()`.""" |
732 | 748 | pass |
@@ -814,6 +830,14 @@ def color(self, c: int, alpha: int, /) -> int: |
814 | 830 | Note that when using hexadecimal notation, it is not necessary to use `color()`, |
815 | 831 | as in: `c = 0x006699` |
816 | 832 |
|
| 833 | + If you have matplotlib installed, you can create colors using matplotlib's |
| 834 | + named colors by passing a color name as a string to this method. See the list of |
| 835 | + named colors in the Matplotlib Named Colors reference. For more information, see |
| 836 | + the Matplotlib Named Colors section in the All About Colors integration |
| 837 | + documentation page. There's also other color related information on that page; |
| 838 | + go read it to learn more about various ways py5 makes it easy for you to work |
| 839 | + with color. |
| 840 | + |
817 | 841 | This method is the same as `color()` but linked to a `Py5Graphics` object. To |
818 | 842 | see example code for how it can be used, see `color()`.""" |
819 | 843 | pass |
@@ -901,6 +925,14 @@ def color(self, gray: float, /) -> int: |
901 | 925 | Note that when using hexadecimal notation, it is not necessary to use `color()`, |
902 | 926 | as in: `c = 0x006699` |
903 | 927 |
|
| 928 | + If you have matplotlib installed, you can create colors using matplotlib's |
| 929 | + named colors by passing a color name as a string to this method. See the list of |
| 930 | + named colors in the Matplotlib Named Colors reference. For more information, see |
| 931 | + the Matplotlib Named Colors section in the All About Colors integration |
| 932 | + documentation page. There's also other color related information on that page; |
| 933 | + go read it to learn more about various ways py5 makes it easy for you to work |
| 934 | + with color. |
| 935 | + |
904 | 936 | This method is the same as `color()` but linked to a `Py5Graphics` object. To |
905 | 937 | see example code for how it can be used, see `color()`.""" |
906 | 938 | pass |
@@ -988,6 +1020,14 @@ def color(self, gray: float, alpha: float, /) -> int: |
988 | 1020 | Note that when using hexadecimal notation, it is not necessary to use `color()`, |
989 | 1021 | as in: `c = 0x006699` |
990 | 1022 |
|
| 1023 | + If you have matplotlib installed, you can create colors using matplotlib's |
| 1024 | + named colors by passing a color name as a string to this method. See the list of |
| 1025 | + named colors in the Matplotlib Named Colors reference. For more information, see |
| 1026 | + the Matplotlib Named Colors section in the All About Colors integration |
| 1027 | + documentation page. There's also other color related information on that page; |
| 1028 | + go read it to learn more about various ways py5 makes it easy for you to work |
| 1029 | + with color. |
| 1030 | + |
991 | 1031 | This method is the same as `color()` but linked to a `Py5Graphics` object. To |
992 | 1032 | see example code for how it can be used, see `color()`.""" |
993 | 1033 | pass |
@@ -1075,6 +1115,14 @@ def color(self, v1: float, v2: float, v3: float, /) -> int: |
1075 | 1115 | Note that when using hexadecimal notation, it is not necessary to use `color()`, |
1076 | 1116 | as in: `c = 0x006699` |
1077 | 1117 |
|
| 1118 | + If you have matplotlib installed, you can create colors using matplotlib's |
| 1119 | + named colors by passing a color name as a string to this method. See the list of |
| 1120 | + named colors in the Matplotlib Named Colors reference. For more information, see |
| 1121 | + the Matplotlib Named Colors section in the All About Colors integration |
| 1122 | + documentation page. There's also other color related information on that page; |
| 1123 | + go read it to learn more about various ways py5 makes it easy for you to work |
| 1124 | + with color. |
| 1125 | + |
1078 | 1126 | This method is the same as `color()` but linked to a `Py5Graphics` object. To |
1079 | 1127 | see example code for how it can be used, see `color()`.""" |
1080 | 1128 | pass |
@@ -1162,6 +1210,14 @@ def color(self, v1: float, v2: float, v3: float, a: float, /) -> int: |
1162 | 1210 | Note that when using hexadecimal notation, it is not necessary to use `color()`, |
1163 | 1211 | as in: `c = 0x006699` |
1164 | 1212 |
|
| 1213 | + If you have matplotlib installed, you can create colors using matplotlib's |
| 1214 | + named colors by passing a color name as a string to this method. See the list of |
| 1215 | + named colors in the Matplotlib Named Colors reference. For more information, see |
| 1216 | + the Matplotlib Named Colors section in the All About Colors integration |
| 1217 | + documentation page. There's also other color related information on that page; |
| 1218 | + go read it to learn more about various ways py5 makes it easy for you to work |
| 1219 | + with color. |
| 1220 | + |
1165 | 1221 | This method is the same as `color()` but linked to a `Py5Graphics` object. To |
1166 | 1222 | see example code for how it can be used, see `color()`.""" |
1167 | 1223 | pass |
@@ -1249,6 +1305,14 @@ def color(self, v1: int, v2: int, v3: int, /) -> int: |
1249 | 1305 | Note that when using hexadecimal notation, it is not necessary to use `color()`, |
1250 | 1306 | as in: `c = 0x006699` |
1251 | 1307 |
|
| 1308 | + If you have matplotlib installed, you can create colors using matplotlib's |
| 1309 | + named colors by passing a color name as a string to this method. See the list of |
| 1310 | + named colors in the Matplotlib Named Colors reference. For more information, see |
| 1311 | + the Matplotlib Named Colors section in the All About Colors integration |
| 1312 | + documentation page. There's also other color related information on that page; |
| 1313 | + go read it to learn more about various ways py5 makes it easy for you to work |
| 1314 | + with color. |
| 1315 | + |
1252 | 1316 | This method is the same as `color()` but linked to a `Py5Graphics` object. To |
1253 | 1317 | see example code for how it can be used, see `color()`.""" |
1254 | 1318 | pass |
@@ -1336,6 +1400,14 @@ def color(self, v1: int, v2: int, v3: int, a: int, /) -> int: |
1336 | 1400 | Note that when using hexadecimal notation, it is not necessary to use `color()`, |
1337 | 1401 | as in: `c = 0x006699` |
1338 | 1402 |
|
| 1403 | + If you have matplotlib installed, you can create colors using matplotlib's |
| 1404 | + named colors by passing a color name as a string to this method. See the list of |
| 1405 | + named colors in the Matplotlib Named Colors reference. For more information, see |
| 1406 | + the Matplotlib Named Colors section in the All About Colors integration |
| 1407 | + documentation page. There's also other color related information on that page; |
| 1408 | + go read it to learn more about various ways py5 makes it easy for you to work |
| 1409 | + with color. |
| 1410 | + |
1339 | 1411 | This method is the same as `color()` but linked to a `Py5Graphics` object. To |
1340 | 1412 | see example code for how it can be used, see `color()`.""" |
1341 | 1413 | pass |
@@ -1439,7 +1511,15 @@ def color(self, hex_code: str, /) -> int: |
1439 | 1511 | (in that order) for the color. Notice that in web color notation the alpha |
1440 | 1512 | channel is last, which is consistent with CSS colors, and in hexadecimal |
1441 | 1513 | notation the alpha channel is first, which is consistent with Processing color |
1442 | | - values.""" |
| 1514 | + values. |
| 1515 | + |
| 1516 | + If you have matplotlib installed, you can create colors using matplotlib's |
| 1517 | + named colors by passing a color name as a string to this method. See the list of |
| 1518 | + named colors in the Matplotlib Named Colors reference. For more information, see |
| 1519 | + the Matplotlib Named Colors section in the All About Colors integration |
| 1520 | + documentation page. There's also other color related information on that page; |
| 1521 | + go read it to learn more about various ways py5 makes it easy for you to work |
| 1522 | + with color.""" |
1443 | 1523 | pass |
1444 | 1524 |
|
1445 | 1525 | @overload |
@@ -1541,7 +1621,15 @@ def color(self, hex_code: str, alpha: int, /) -> int: |
1541 | 1621 | (in that order) for the color. Notice that in web color notation the alpha |
1542 | 1622 | channel is last, which is consistent with CSS colors, and in hexadecimal |
1543 | 1623 | notation the alpha channel is first, which is consistent with Processing color |
1544 | | - values.""" |
| 1624 | + values. |
| 1625 | + |
| 1626 | + If you have matplotlib installed, you can create colors using matplotlib's |
| 1627 | + named colors by passing a color name as a string to this method. See the list of |
| 1628 | + named colors in the Matplotlib Named Colors reference. For more information, see |
| 1629 | + the Matplotlib Named Colors section in the All About Colors integration |
| 1630 | + documentation page. There's also other color related information on that page; |
| 1631 | + go read it to learn more about various ways py5 makes it easy for you to work |
| 1632 | + with color.""" |
1545 | 1633 | pass |
1546 | 1634 |
|
1547 | 1635 | def color(self, *args) -> int: |
@@ -1626,6 +1714,14 @@ def color(self, *args) -> int: |
1626 | 1714 | Note that when using hexadecimal notation, it is not necessary to use `color()`, |
1627 | 1715 | as in: `c = 0x006699` |
1628 | 1716 |
|
| 1717 | + If you have matplotlib installed, you can create colors using matplotlib's |
| 1718 | + named colors by passing a color name as a string to this method. See the list of |
| 1719 | + named colors in the Matplotlib Named Colors reference. For more information, see |
| 1720 | + the Matplotlib Named Colors section in the All About Colors integration |
| 1721 | + documentation page. There's also other color related information on that page; |
| 1722 | + go read it to learn more about various ways py5 makes it easy for you to work |
| 1723 | + with color. |
| 1724 | + |
1629 | 1725 | This method is the same as `color()` but linked to a `Py5Graphics` object. To |
1630 | 1726 | see example code for how it can be used, see `color()`.""" |
1631 | 1727 | args = list(args) |
|
0 commit comments