Skip to main content

A modern color picker for customtkinter

Project description

CTkColorPicker

A modern color picker made for customtkinter!

Screenshot

Download

pip install CTkColorPicker

GitHub repo size

Requirements

How to use?

import customtkinter as ctk
from CTkColorPicker import *

def ask_color():
    pick_color = AskColor() # open the color picker
    color = pick_color.get() # get the color string
    button.configure(fg_color=color)
    
root = ctk.CTk()

button = ctk.CTkButton(master=root, text="CHOOSE COLOR", text_color="black", command=ask_color)
button.pack(padx=30, pady=20)
root.mainloop()

Options

Arguments Description
width set the overall size of the color picker window
title change the title of color picker window
fg_color change forground color of the color picker frame
bg_color change background color of the color picker frame
button_color change the color of the button and slider
button_hover_color change the hover color of the buttons
text change the default text of the 'OK' button
initial_color set the default color of color picker (currently in beta stage)
slider_border change the border width of slider
corner_radius change the corner radius of all the widgets inside color picker
**other button parameters pass other button arguments if required

ColorPickerWidget

This is a new color picker widget that can be placed inside a customtkinter frame.

Screenshot 2023-05-17 191125

Usage

from CTkColorPicker import *
import customtkinter

root = customtkinter.CTk()
colorpicker = CTkColorPicker(root, width=500, command=lambda e: print(e))
colorpicker.pack(padx=10, pady=10)
root.mainloop()

Options

Arguments Description
master parent widget
width set the overall size of the color picker frame
fg_color change forground color of the color picker frame
initial_color set the default color of color picker (currently in beta stage)
slider_border change the border width of slider
corner_radius change the corner radius of all the widgets inside color picker
command add a command when the color is changed
**other slider parameters pass other slider arguments if required

That's all, hope it will help!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

CTkColorPicker-0.7.0.tar.gz (121.5 kB view details)

Uploaded Source

Built Distribution

CTkColorPicker-0.7.0-py3-none-any.whl (123.0 kB view details)

Uploaded Python 3

File details

Details for the file CTkColorPicker-0.7.0.tar.gz.

File metadata

  • Download URL: CTkColorPicker-0.7.0.tar.gz
  • Upload date:
  • Size: 121.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for CTkColorPicker-0.7.0.tar.gz
Algorithm Hash digest
SHA256 3a6bed2dd922a2f53a8313a4c47aba9b198f81af06c34486658cd87c3d0afd1c
MD5 a2e9fa51b04e249e67367a54d81f2a99
BLAKE2b-256 14bb0055c501d3827cb267939989b3ab0e1ca112d4eed5e2389eb4db64ce5e4e

See more details on using hashes here.

File details

Details for the file CTkColorPicker-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for CTkColorPicker-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0b3ca248266ae04256136eff9cf807bb53c045db95af7749a151ef5ab959162
MD5 f4ca7e6bf58d40a9fad73ff373716d15
BLAKE2b-256 361065f7d9e083d65cfe2e866629e30bc1823c130327454a3443e027314a0e80

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page