turtle.colormode() function in Python Last Updated : 28 Jul, 2020 Comments Improve Suggest changes Like Article Like Report The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.colormode() This function is used to return the color mode or set it to 1.0 or 255. (r, g, b) values of color triples have to be in range 0 to c mode. It requires only one argument as "cmode" one of the values 1.0 or 255. Syntax : turtle.colormode(mode=None) Below is the implementation of the above method with some examples : Example 1 : Python3 # import package import turtle # check the default value print(turtle.color()) Output : ('black', 'black') Example 2 : Python3 # import package import turtle # set the colormode to 255 turtle.colormode(255) # set color turtle.color(0,0,255) # motion for i in range(20): turtle.forward(2+2*i) turtle.right(90) # set the colormode to 1.0 turtle.colormode(1.0) # set color turtle.color(1.0,0,0) # motion for i in range(20): turtle.forward(40+4*i) turtle.right(90) Output : Comment More infoAdvertise with us Next Article turtle.colormode() function in Python D deepanshu_rustagi Follow Improve Article Tags : Python Python-turtle Practice Tags : python Similar Reads turtle.fillcolor() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.fillcolor() This method is used to return or set the fillcolor. If turtlesha 2 min read turtle.dot() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.dot()This function is used to draw a circular dot with a particular size, wi 2 min read turtle.Screen().bgcolor() function in Python The Python turtle module simplifies graphics creation, making it easier to learn programming through visualization. Built on Tkinter, it supports both object-oriented and procedural approaches. The turtle.Screen().bgcolor() method sets or retrieves the background color using color names (e.g., "blue 2 min read turtle.bgpic() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.bgpic() This function is used to set a background image or return name of th 1 min read turtle.distance() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.distance() This method is used to return the distance from the turtle to (x, 2 min read turtle.mode() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.mode() This function is used to set turtle-mode ('standard', 'logo' or 'worl 1 min read turtle.home() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.home() This function is used to move the turtle to the origin i.e. coordinat 1 min read turtle.getpen() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.getpen() This function is used to return the Turtleobject itself. It doesn't 1 min read turtle.ontimer() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.ontimer() This function is used to install a timer, which calls fun after t 1 min read turtle.color() method in Python turtle.color() method is a function of the turtle module in Python used to change the color of the turtleâs pen and fill. It allows us to customize the appearance of shapes drawn by the turtle by specifying colors using color names, RGB values, or hex codes.Syntaxturtle.color(*args)The *args allows 3 min read Like