Mundo em Python

Código hex

from tkinter import *
root = Tk()
root.title("Cores")
root.geometry("410x200")
root.resizable(False, False)
def alterar(v):
color_c='#%02x%02x%02x' % (vermelho.get(), verde.get(), azul.get())
texto.config(bg=color_c) # Updating background colour of button
texto.config(text=color_c)# Updating text of the button
vermelho = Scale(root, from_=0, to=255,bg='red', orient='horizontal',
length=250,command=alterar)
vermelho.grid(row=0,column=0,padx=5,pady=10)
verde = Scale(root, from_=0, to=255,bg='green', orient='horizontal',
length=250,command=alterar)
verde.grid(row=1,column=0,padx=5,pady=10)
azul = Scale(root, from_=0, to=255,bg='blue', orient='horizontal',
length=250,command=alterar)
azul.grid(row=2,column=0,pady=10)
texto = Label(text='Minha Cor',font=(('Time','14','normal')))
texto.place(relx=0.75,rely=0.55,relwidth=0.2)
root.mainloop()


0