@@ -777,13 +777,17 @@ Turtle motion
777
777
180.0
778
778
779
779
780
- .. function :: dot(size=None, *color)
780
+ .. function :: dot()
781
+ dot(size)
782
+ dot(color, /)
783
+ dot(size, color, /)
784
+ dot(size, r, g, b, /)
781
785
782
786
:param size: an integer >= 1 (if given)
783
787
:param color: a colorstring or a numeric color tuple
784
788
785
789
Draw a circular dot with diameter *size *, using *color *. If *size * is
786
- not given, the maximum of pensize+4 and 2*pensize is used.
790
+ not given, the maximum of `` pensize+4` and `` 2*pensize `` is used.
787
791
788
792
789
793
.. doctest ::
@@ -1152,7 +1156,9 @@ Drawing state
1152
1156
Color control
1153
1157
~~~~~~~~~~~~~
1154
1158
1155
- .. function :: pencolor(*args)
1159
+ .. function :: pencolor()
1160
+ pencolor(color, /)
1161
+ pencolor(r, g, b, /)
1156
1162
1157
1163
Return or set the pencolor.
1158
1164
@@ -1161,7 +1167,7 @@ Color control
1161
1167
``pencolor() ``
1162
1168
Return the current pencolor as color specification string or
1163
1169
as a tuple (see example). May be used as input to another
1164
- color/pencolor/fillcolor call.
1170
+ color/pencolor/fillcolor/bgcolor call.
1165
1171
1166
1172
``pencolor(colorstring) ``
1167
1173
Set pencolor to *colorstring *, which is a Tk color specification string,
@@ -1201,7 +1207,9 @@ Color control
1201
1207
(50.0, 193.0, 143.0)
1202
1208
1203
1209
1204
- .. function :: fillcolor(*args)
1210
+ .. function :: fillcolor()
1211
+ fillcolor(color, /)
1212
+ fillcolor(r, g, b, /)
1205
1213
1206
1214
Return or set the fillcolor.
1207
1215
@@ -1210,7 +1218,7 @@ Color control
1210
1218
``fillcolor() ``
1211
1219
Return the current fillcolor as color specification string, possibly
1212
1220
in tuple format (see example). May be used as input to another
1213
- color/pencolor/fillcolor call.
1221
+ color/pencolor/fillcolor/bgcolor call.
1214
1222
1215
1223
``fillcolor(colorstring) ``
1216
1224
Set fillcolor to *colorstring *, which is a Tk color specification string,
@@ -1244,7 +1252,10 @@ Color control
1244
1252
(255.0, 255.0, 255.0)
1245
1253
1246
1254
1247
- .. function :: color(*args)
1255
+ .. function :: color()
1256
+ color(color, /)
1257
+ color(r, g, b, /)
1258
+ color(pencolor, fillcolor, /)
1248
1259
1249
1260
Return or set pencolor and fillcolor.
1250
1261
@@ -1870,13 +1881,32 @@ Most of the examples in this section refer to a TurtleScreen instance called
1870
1881
Window control
1871
1882
--------------
1872
1883
1873
- .. function :: bgcolor(*args)
1884
+ .. function :: bgcolor()
1885
+ bgcolor(color, /)
1886
+ bgcolor(r, g, b, /)
1874
1887
1875
- :param args: a color string or three numbers in the range 0..colormode or a
1876
- 3-tuple of such numbers
1888
+ Return or set the background color of the TurtleScreen.
1877
1889
1890
+ Four input formats are allowed:
1891
+
1892
+ ``bgcolor() ``
1893
+ Return the current background color as color specification string or
1894
+ as a tuple (see example). May be used as input to another
1895
+ color/pencolor/fillcolor/bgcolor call.
1896
+
1897
+ ``bgcolor(colorstring) ``
1898
+ Set the background color to *colorstring *, which is a Tk color
1899
+ specification string, such as ``"red" ``, ``"yellow" ``, or ``"#33cc8c" ``.
1878
1900
1879
- Set or return background color of the TurtleScreen.
1901
+ ``bgcolor((r, g, b)) ``
1902
+ Set the background color to the RGB color represented by the tuple of
1903
+ *r *, *g *, and *b *.
1904
+ Each of *r *, *g *, and *b * must be in the range 0..colormode, where
1905
+ colormode is either 1.0 or 255 (see :func: `colormode `).
1906
+
1907
+ ``bgcolor(r, g, b) ``
1908
+ Set the background color to the RGB color represented by *r *, *g *, and *b *. Each of
1909
+ *r *, *g *, and *b * must be in the range 0..colormode.
1880
1910
1881
1911
.. doctest ::
1882
1912
:skipif: _tkinter is None
0 commit comments