The themed widgets are in 'themed Tk' aka ttk.
import tkinter as tk
import tkinter.ttk as ttk
root = tk.Tk()
ok = ttk.Button(root, text='OK')
ok.pack()
root.mainloop()
Avoid from tkinter import * as both tkinter and tkinter.ttk define Button and many other widgets.
If you use this on Windows you should get something looking like a native button. But this is a theme and can be changed. On Linux or MacOS you will get a button style that is appropriate to that platform.
Answer from patthoyts on Stack OverflowVideos
The themed widgets are in 'themed Tk' aka ttk.
import tkinter as tk
import tkinter.ttk as ttk
root = tk.Tk()
ok = ttk.Button(root, text='OK')
ok.pack()
root.mainloop()
Avoid from tkinter import * as both tkinter and tkinter.ttk define Button and many other widgets.
If you use this on Windows you should get something looking like a native button. But this is a theme and can be changed. On Linux or MacOS you will get a button style that is appropriate to that platform.
Another alternative to create button is to create a label and bind it to the action functions. In the below example .bind() is used to connect the label with respective function. You can design according to your requirements.
from tkinter import *
def OnPressed(event):
print('Hello')
def OnHover(event):
But.config(bg='red', fg='white')
def OnLeave(event):
But.config(bg='white', fg='black')
root = Tk()
But = Label(root, text='Hi', bg='white', relief='groove')
But.place(x=10, y=10, width=100)
But.bind('<Button-1>', OnPressed)
But.bind('<Enter>', OnHover)
But.bind('<Leave>', OnLeave)
root.mainloop()
So configuring a buttons colors is a bit different when using tkinter button VS a ttk style button.
For a tkinter button you would use the background = "color" argument like the following:
button1 = Button( rootWindow, text="Change Label",
background = 'black', foreground = "white", command=change)
For a ttk button you would configure the style and then use the style = "style name" argument like the following.
style = ttk.Style()
style.configure("BW.TLabel", foreground="white", background="black")
buttonTTK = ttk.Button( rootWindow, text="TTK BUTTON",style = "BW.TLabel", command=change)
More information on ttk configs can be found here
from tkinter import *
from tkinter import ttk
def change():
print("change functon called")
def main():
rootWindow = Tk()
label = ttk.Label( rootWindow, text="Hello World!",
background = 'black', foreground = "white")
label.pack()
button1 = Button( rootWindow, text="Change Label",
background = 'black', foreground = "white", command=change)
button1.pack()
style = ttk.Style()
style.configure("BW.TLabel", foreground="white", background="black")
buttonTTK = ttk.Button( rootWindow, text="TTK BUTTON",style = "BW.TLabel", command=change)
buttonTTK.pack()
rootWindow.mainloop()
main()
Result:

On Windows 10, I have run into the same problem, and have found a solution, although not a very satisfying one. The following will create a black button with white foreground type:
First define a custom button style based on the standard TButton style
mystyle = ttk.Style()
mystyle.configure('mycustom.TButton',background='black',foreground='white')
Then create the button using the new custom style
mybutton = ttk.Button(root,style='mycustom.Tbutton')
I say 'not very satisfying' because this only works if I have previously set the overall theme to 'default' as follows:
mystyle = ttk.Style()
mystyle.theme_use('default')
Using any of the other themes available on my system (winnative,clam,alt,classic,vista and xpnative) will change only the border to black, and leave the background grey.
It's possible!
If you check out the button documentation, you can use an image to display on the button.
For example:
from tkinter import *
root = Tk()
button = Button(root, text="Click me!")
img = PhotoImage(file="C:/path to image/example.gif") # make sure to add "/" not "\"
button.config(image=img)
button.pack() # Displaying the button
root.mainloop()
This is a simplified example for adding an image to a button widget, you can make many more cool things with the button widget.
I created a library called CustomTkinter, and with it you can create more or less exactly what is shown in the images above. CustomTkinter provides widgets to be used similar to Tkinter. They can be customised in color and shape, here I tried to create something similar to the image above:

There is not also a button, but many other elements, and it also supports a dark and light theme:

You can check out the library here:
https://customtkinter.tomschimansky.com https://github.com/TomSchimansky/CustomTkinter
A simple example would be:
import customtkinter
customtkinter.set_appearance_mode("System")
customtkinter.set_default_color_theme("blue")
app = customtkinter.CTk() # create window
app.geometry("400x240")
def button_callback():
print("button pressed")
# create button
button = customtkinter.CTkButton(app, command=button_callback)
button.grid(row=0, column=0, padx=20, pady=20)
app.mainloop()
which gives the following on macOS:
