Рубрики

color

How to color a turtle

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!


Python – turtle.pencolor() method

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.

This method is used to change the color of the ink of the turtle drawing. The default color is black.

Syntax: turtle.pencolor(*args)

Arguments: This method have following arguments:

  • colorstring: (optional) colorstring A string of color name like “red”, “green”, etc.
  • (r, g, b): (optional) A tuple of three values r, g, and b using rgb color code.
  • r, g, b: (optional) Three values r, g, and b using rgb color code.

Below is the implementation of above method with an example :





turtle.color() method 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.

This method is used to change the color of the turtle. The default color is black.

Syntax:

turtle.color(*args)

Parameters:

Save Article

Please Login to comment.

Similar Reads
turtle.forward() method in Python-Turtle
turtle.setpos() and turtle.goto() functions in Python

Similar read thumbnail

Draw Color Filled Shapes in Turtle – Python
How to draw color filled star in Python-Turtle?

Similar read thumbnail

Set Pandas dataframe background Color and font color in Python

turtle.right() method in Python
Python – turtle.delay() method
turtle.backward() method in Python
turtle.up() method in Python
turtle.down() method in Python
Related Tutorials

OpenAI Python API – Complete Guide

Similar read thumbnail

Pandas AI: The Generative AI Python Library

Python for Kids – Fun Tutorial to Learn Python Programming

Data Analysis Tutorial

Flask Tutorial
Like
Article Contributed By :
Vote for difficulty
Current difficulty : Basic
Easy Normal Medium Hard Expert
Improved By :
Article Tags :
Practice Tags :
Report Issue
Courses

192k+ interested Geeks
Data Structures & Algorithms in Python – Self Paced
Beginner to Advance –> Explore

161k+ interested Geeks
Python Programming Foundation – Self Paced
Beginner and Intermediate –> Explore

179k+ interested Geeks
Complete Machine Learning & Data Science Program
Beginner to Advance –> Explore
Recently Published

article-card

7 Best Django Courses and Certifications [2023]
Read

article-card

Crack UX Design Interview: Most Asked UX Design Questions, Tips and Tricks
Read

article-card

Top 15 AI Website Builders For UI UX Designers
Read

Spring Boot vs Node.js – Which One Should You Choose?
Read

article-card

10 Best JavaScript Courses and Certifications [2023]
Read

article-card

Top 10 Microservices Patterns That Every Developer Should Know
Read

Visual Studio vs Visual Studio Code – What to Choose in 2023?
Read

article-card

Top 7 Node.js Alternatives [2023 Updated]
Read

article-card

11 Best Free Coding Bootcamps [2023]
Read
Explore More

A-143, 9th Floor, Sovereign Corporate Tower, Sector-136, Noida, Uttar Pradesh – 201305

  • Company
  • About Us
  • Legal
  • Careers
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Apply for Mentor
  • Explore
  • Job-A-Thon Hiring Challenge
  • Hack-A-Thon
  • GfG Weekly Contest
  • Offline Classes (Delhi/NCR)
  • DSA in JAVA/C++
  • Master System Design
  • Master CP
  • GeeksforGeeks Videos
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • DSA Concepts
  • Data Structures
  • Arrays
  • Strings
  • Linked List
  • Algorithms
  • Searching
  • Sorting
  • Mathematical
  • Dynamic Programming
  • DSA Roadmaps
  • DSA for Beginners
  • Basic DSA Coding Problems
  • DSA Roadmap by Sandeep Jain
  • DSA with JavaScript
  • Top 100 DSA Interview Problems
  • All Cheat Sheets
  • Web Development
  • HTML
  • CSS
  • JavaScript
  • Bootstrap
  • ReactJS
  • AngularJS
  • NodeJS
  • Express.js
  • Lodash
  • Computer Science
  • GATE CS Notes
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Python
  • Python Programming Examples
  • Django Tutorial
  • Python Projects
  • Python Tkinter
  • OpenCV Python Tutorial
  • Python Interview Question
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning Tutorial
  • Maths For Machine Learning
  • Pandas Tutorial
  • NumPy Tutorial
  • NLP Tutorial
  • Deep Learning Tutorial
  • DevOps
  • Git
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • Competitive Programming
  • Top DSA for CP
  • Top 50 Tree Problems
  • Top 50 Graph Problems
  • Top 50 Array Problems
  • Top 50 String Problems
  • Top 50 DP Problems
  • Top 15 Websites for CP
  • System Design
  • What is System Design
  • Monolithic and Distributed SD
  • Scalability in SD
  • Databases in SD
  • High Level Design or HLD
  • Low Level Design or LLD
  • Top SD Interview Questions
  • Interview Corner
  • Company Wise Preparation
  • Preparation for SDE
  • Experienced Interviews
  • Internship Interviews
  • Competitive Programming
  • Aptitude Preparation
  • GfG School
  • CBSE Notes for Class 8
  • CBSE Notes for Class 9
  • CBSE Notes for Class 10
  • CBSE Notes for Class 11
  • CBSE Notes for Class 12
  • English Grammar
  • Commerce
  • Accountancy
  • Business Studies
  • Economics
  • Human Resource Management (HRM)
  • Management
  • Income Tax
  • Finance
  • Statistics for Economics
  • UPSC
  • Polity Notes
  • Geography Notes
  • History Notes
  • Science and Technology Notes
  • Economics Notes
  • Important Topics in Ethics
  • UPSC Previous Year Papers
  • SSC/ BANKING
  • SSC CGL Syllabus
  • SBI PO Syllabus
  • SBI Clerk Syllabus
  • IBPS PO Syllabus
  • IBPS Clerk Syllabus
  • Aptitude Questions
  • SSC CGL Practice Papers
  • Write & Earn
  • Write an Article
  • Improve an Article
  • Pick Topics to Write
  • Share your Experiences
  • Internships

We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy Got It !

Improvement
Please go through our recently updated Improvement Guidelines before submitting any improvements.

This article is being improved by another user right now. You can suggest the changes for now and it will be under the article’s discussion tab.

You will be notified via email once the article is available for improvement. Thank you for your valuable feedback!

Suggest changes
Please go through our recently updated Improvement Guidelines before submitting any improvements.
Suggest Changes

Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.

Create Improvement

Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.

Colin Wynn
the authorColin Wynn

Leave a Reply