https://github.com/akascape/ctkcolorpicker
A modern color picker made for customtkinter! (extension/add-on)
https://github.com/akascape/ctkcolorpicker
color-palette color-picker colour-picker customtkinter customtkinter-color-picker python-ui tkinter tkinter-color-picker tkinter-gui
Last synced: 5 months ago
JSON representation
A modern color picker made for customtkinter! (extension/add-on)
- Host: GitHub
- URL: https://github.com/akascape/ctkcolorpicker
- Owner: Akascape
- License: cc0-1.0
- Created: 2022-12-22T16:30:28.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-23T23:30:26.000Z (about 1 year ago)
- Last Synced: 2025-04-15T21:22:27.565Z (6 months ago)
- Topics: color-palette, color-picker, colour-picker, customtkinter, customtkinter-color-picker, python-ui, tkinter, tkinter-color-picker, tkinter-gui
- Language: Python
- Homepage:
- Size: 182 KB
- Stars: 75
- Watchers: 3
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CTkColorPicker
**A modern color picker made for customtkinter!**
## Download
```
pip install CTkColorPicker
```### [
](https://github.com/Akascape/CTkColorPicker/archive/refs/heads/main.zip)
## Requirements
- [customtkinter](https://github.com/TomSchimansky/CustomTkinter)
- [pillow](https://pypi.org/project/Pillow/)### How to use?
```python
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.**
### Usage
```python
from CTkColorPicker import *
import customtkinterroot = 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!**