Skip to main content

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
orientation change orientation of slider and label
**other slider parameters pass other slider arguments if required

That's all, hope it will help!

Metadata

Release files for CTkColorPicker 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for CTkColorPicker 0.9.0
File Size Uploaded
CTkColorPicker-0.9.0.tar.gz 121.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for CTkColorPicker 0.9.0
File Interpreter ABI Platform
CTkColorPicker-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 244.6 kB

Release files / CTkColorPicker-0.9.0.tar.gz

Download URL CTkColorPicker-0.9.0.tar.gz
Size 121.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5f65e35d0cf9d0c9fee7e24f3f460e256641f0e335ab00c17425bb0d16060b0c
BLAKE2b-256 checksum
How to use checksums
08d4e10f2f5e827325eb51983e4b19793c7de8e1865d5db5c1da4857b6690732
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.0

Release files / CTkColorPicker-0.9.0-py3-none-any.whl

Download URL CTkColorPicker-0.9.0-py3-none-any.whl
Size 123.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8406f0c321c1fc3b513e1aa74200bc4a30bc03e2448247519907689031af190b
BLAKE2b-256 checksum
How to use checksums
5b8dc3f374fd7627deb35c37795e8799fc40f72a510fde0f465e6c792c58624e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page