Tkinter Colors – A Complete Guide

Tkinter is an inbuilt module available in Python for developing Graphical User Interfaces (GUI). It allows us to develop desktop applications. Tkinter is very simple and easy to work with. It provides us with different widgets like button, canvas, label, menu, message, etc. for building the GUIs in Python.

You can explore all of our Tkinter tutorials as well! This tutorial will introduce you to the use of different colour options in Tkinter.


What are Colors in Tkinter?

Colours are mainly used for making the GUI attractive. Tkinter treats colours as strings. Colours can be mentioned in two ways:

  1. Hexadecimal values
    Ex. #FF0000 (Red), #008000 (Green), #FFFF00 (Yellow), etc.
  2. Colour Name
    Ex. Gold, Silver, Blue, etc.

Here is a list of colour codes for quick reference:

Tkinter Colour List
Tkinter Colour List

Now, let’s explore the different colour options available to us in Tkinter.