An eight-digits hex code color picker, with alpha value.
Project description
CTkColorPickerAlpha
A special color picker that supports picking transparent color (8-digits hex code)
Download
pip install ctk-color-picker-alpha
Requirements
How to use?
import customtkinter as ctk
from ctk_color_picker_alpha import *
def ask_color():
pick_color = AskColor() # open the color picker
color = pick_color.get() # get the color string
print(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, always greater than 300 pixels |
| title | change the title of color picker window |
| fg_color | change foreground 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 |
| enable_previewer | if True, display the color previewer |
| enable_alpha | if True, enable 8-digits hex code and transparency. Otherwise, use 6-digits hex code and disable transparency |
| allow_hexcode_modification | if True, enable modifications to hex code textbox |
| enable_random_button | if True, display the 'Random' button |
| **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
from ctk_color_picker_alpha import *
import customtkinter
root = customtkinter.CTk()
colorpicker = CTkColorPicker(master=root)
colorpicker.pack(padx=10, pady=10)
root.mainloop()
Options
| Arguments | Description |
|---|---|
| master | parent widget |
| width | set the overall size of the color picker window, always greater than 300 pixels |
| title | change the title of color picker window |
| fg_color | change foreground 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 |
| enable_previewer | if True, display the color previewer |
| enable_alpha | if True, enable 8-digits hex code and transparency. Otherwise, use 6-digits hex code and disable transparency |
| allow_hexcode_modification | if True, enable modifications to hex code textbox |
| enable_random_button | if True, display the 'Random' button |
| **other button parameters | pass other button arguments if required |
Forked from https://github.com/Akascape/CTkColorPicker
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ctk_color_picker_alpha-0.8.9.tar.gz
(130.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ctk_color_picker_alpha-0.8.9.tar.gz.
File metadata
- Download URL: ctk_color_picker_alpha-0.8.9.tar.gz
- Upload date:
- Size: 130.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.5 Darwin/22.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89872478319c48ce36940a6d64ba8547f86e1a4681db39e49a2e111164fb287f
|
|
| MD5 |
b0a31c25df3258990f62a0f2d052e381
|
|
| BLAKE2b-256 |
42f19011de47e5a0cdefc7027b725efcaa387814d60a937fa1a141ec5c2c2473
|
File details
Details for the file ctk_color_picker_alpha-0.8.9-py3-none-any.whl.
File metadata
- Download URL: ctk_color_picker_alpha-0.8.9-py3-none-any.whl
- Upload date:
- Size: 131.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.5 Darwin/22.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
541bc2391e81fc566a5a3de22e7cc43504b948ce7d4ffadbf47687ce462acba0
|
|
| MD5 |
64f80c41b952f1edfa6ea1dbe0ea5682
|
|
| BLAKE2b-256 |
301fd29400fe04024b2759da2df5619a0a3874d44445890ab396e3f7ec0c0ded
|