Socket
Book a DemoInstallSign in
Socket

ctk-colorpicker-plus

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ctk-colorpicker-plus

Enhanced CustomTkinter color picker widget with bug fixes, hex input, and improved reticle/slider behavior.

0.1.1
pipPyPI
Maintainers
1

ctk-colorpicker-plus

An extended and modernized color picker for CustomTkinter, featuring both a modal dialog and embeddable widget with a color wheel, brightness slider, and hex entry.

Forked from the original CTkColorPicker by Akash Bora (Akascape) — with bug fixes, enhancements, and new features.

Modal color picker, light and dark

Features

  • Two usage modes:
    • AskColor — modal dialog for picking a color
    • CTkColorPicker — embeddable widget for your layouts
  • Accurate reticle positioning — fixed hue/saturation calculation bug
  • Brightness slider — smooth 0–255 range
  • Hex entry field — accepts user input, short (#fff) or full (#ffffff) hex values
  • Real-time updates — changes propagate immediately to the UI and optional callbacks
  • Appearance-mode aware — adapts to light/dark or system themes in CustomTkinter
  • Fully type-hinted and ruff/black formatted

Animated Demo

Installation

From PyPI (once published):

pip install ctk-colorpicker-plus

Until then, install from GitHub:

pip install git+https://github.com/calusasoft/ctk-colorpicker-plus.git

Quick Start

Modal Dialog

Modal color picker dialog, light-themed

import customtkinter
from ctk_colorpicker_plus import AskColor

customtkinter.set_appearance_mode("light")

root = customtkinter.CTk()

def pick_color():
    dialog = AskColor(initial_color="#ff0000")
    color = dialog.get()
    if color:
        print(f"Selected: {color}")

btn = customtkinter.CTkButton(root, text="Pick a color", command=pick_color)
btn.pack(pady=20)

root.mainloop()

Embedded Widget

Embedded color picker widget, dark-themed

import customtkinter
from ctk_colorpicker_plus import CTkColorPicker

def on_color_change(hex_color: str):
    print(f"Color changed: {hex_color}")

root = customtkinter.CTk()
picker = CTkColorPicker(root, command=on_color_change)
picker.pack(padx=20, pady=20)

root.mainloop()

Project Structure

ctk_colorpicker_plus/
    __init__.py
    ctk_color_picker.py          # Modal dialog
    ctk_color_picker_widget.py   # Embeddable widget
    color_utils.py               # Shared color math and helpers
    color_wheel.png
    target.png
examples/
    demo.py

Requirements

Install dependencies:

pip install customtkinter Pillow

License

This project is released under the MIT License.

Attribution: Based on CTkColorPicker by Akash Bora (Akasacape), originally released under CC0.

Credits

  • Original Author: Akash Bora (Akascape) — GitHub
  • Maintainer: Phil Rice - GitHub
  • Contributors: Victor Vimbert-Guerlais and the open source community

Keywords

customtkinter

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.