140 standard named colors supported by Tkinter and modern browsers
RGB stands for Red, Green, Blue — the three primary colors of light. Every color on a digital screen is created by mixing these three channels at different intensities.
Each channel has a value from 0 (none) to 255 (full brightness). Mixing all three at full intensity gives white; setting all three to zero gives black. In between, over 16 million unique colors are possible.
In Python's Tkinter GUI library, you can specify colors in two ways: by their hex code (e.g. #FF6347) or by one of the 140 standard named colors shown below (e.g. "tomato"). Both refer to the same underlying RGB values.
# Using a named color in Tkinter
label = tk.Label(root, text="Hello", bg="tomato", fg="white")
# Using a hex code — same result
label = tk.Label(root, text="Hello", bg="#FF6347", fg="#FFFFFF")
# Building a color from RGB values
r, g, b = 255, 99, 71
hex_color = f"#{r:02X}{g:02X}{b:02X}" # → "#FF6347"
#FFFF00
#FF00FF
#00FFFF
#FFFFFF
#RGB expands to #RRGGBB, so #F00 = #FF0000 (pure red).
Drag the sliders to mix red, green, and blue. The Tkinter-ready code updates instantly.
Hover over any swatch to see it scale. All names work directly in Tkinter as strings.