ctk-colorpicker-plus


Namectk-colorpicker-plus JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryEnhanced CustomTkinter color picker widget with bug fixes, hex input, and improved reticle/slider behavior.
upload_time2025-08-13 18:42:55
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2025 Phil Rice / The Rhys Group LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --- This project is based on CTkColorPicker by Akash Bora (Akascape), originally released under the Creative Commons Zero v1.0 Universal (CC0) license: https://github.com/Akascape/CTkColorPicker
keywords customtkinter tkinter colorpicker color wheel gui
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ctk-colorpicker-plus
An extended and modernized color picker for [CustomTkinter](https://github.com/TomSchimansky/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)](https://github.com/Akascape) — with bug fixes, enhancements, and new features.

![Modal color picker, light and dark](https://github.com/user-attachments/assets/7811857c-4367-4b2d-9ced-e3ad02f03f68)

---

## 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](https://github.com/user-attachments/assets/84337580-acef-4481-bc6a-3d4990da149b)](https://www.youtube.com/watch?v=WLTVBCdxEOA)

---

## 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](https://github.com/user-attachments/assets/6e6b9948-859e-4d53-8053-497881a8e5da)
```
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](https://github.com/user-attachments/assets/ef1e87bb-9ba5-445a-aa94-54f4861abc06)
```
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
- Python 3.8+
- [CustomTkinter](https://github.com/TomSchimansky/CustomTkinter)
- [Pillow](https://pypi.org/project/pillow/)

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](https://github.com/Akascape)
- **Maintainer:** Phil Rice - [GitHub](https://github.com/calusasoft)
- **Contributors:** Victor Vimbert-Guerlais and the open source community

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ctk-colorpicker-plus",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "customtkinter, tkinter, colorpicker, color wheel, gui",
    "author": null,
    "author_email": "Phil Rice <overman@z-studios.com>",
    "download_url": "https://files.pythonhosted.org/packages/3b/51/7d4355d61db623ae068d25f7b2a50be2054d30961e6a60459914d8a3dc7c/ctk_colorpicker_plus-0.1.1.tar.gz",
    "platform": null,
    "description": "# ctk-colorpicker-plus\r\nAn extended and modernized color picker for [CustomTkinter](https://github.com/TomSchimansky/CustomTkinter), featuring both a modal dialog and embeddable widget with a color wheel, brightness slider, and hex entry.\r\n\r\nForked from the original **CTkColorPicker** by [Akash Bora (Akascape)](https://github.com/Akascape) \u2014 with bug fixes, enhancements, and new features.\r\n\r\n![Modal color picker, light and dark](https://github.com/user-attachments/assets/7811857c-4367-4b2d-9ced-e3ad02f03f68)\r\n\r\n---\r\n\r\n## Features\r\n\r\n- **Two usage modes**:\r\n  - `AskColor` \u2014 modal dialog for picking a color\r\n  - `CTkColorPicker` \u2014 embeddable widget for your layouts\r\n- **Accurate reticle positioning** \u2014 fixed hue/saturation calculation bug\r\n- **Brightness slider** \u2014 smooth 0\u2013255 range\r\n- **Hex entry field** \u2014 accepts user input, short (`#fff`) or full (`#ffffff`) hex values\r\n- **Real-time updates** \u2014 changes propagate immediately to the UI and optional callbacks\r\n- **Appearance-mode aware** \u2014 adapts to light/dark or system themes in CustomTkinter\r\n- Fully type-hinted and `ruff`/`black` formatted\r\n\r\n[![Animated Demo](https://github.com/user-attachments/assets/84337580-acef-4481-bc6a-3d4990da149b)](https://www.youtube.com/watch?v=WLTVBCdxEOA)\r\n\r\n---\r\n\r\n## Installation\r\n\r\nFrom PyPI (once published):\r\n\r\n```\r\npip install ctk-colorpicker-plus\r\n```\r\nUntil then, install from GitHub:\r\n```\r\npip install git+https://github.com/calusasoft/ctk-colorpicker-plus.git\r\n```\r\n\r\n---\r\n\r\n## Quick Start\r\n\r\n### Modal Dialog\r\n![Modal color picker dialog, light-themed](https://github.com/user-attachments/assets/6e6b9948-859e-4d53-8053-497881a8e5da)\r\n```\r\nimport customtkinter\r\nfrom ctk_colorpicker_plus import AskColor\r\n\r\ncustomtkinter.set_appearance_mode(\"light\")\r\n\r\nroot = customtkinter.CTk()\r\n\r\ndef pick_color():\r\n    dialog = AskColor(initial_color=\"#ff0000\")\r\n    color = dialog.get()\r\n    if color:\r\n        print(f\"Selected: {color}\")\r\n\r\nbtn = customtkinter.CTkButton(root, text=\"Pick a color\", command=pick_color)\r\nbtn.pack(pady=20)\r\n\r\nroot.mainloop()\r\n```\r\n\r\n### Embedded Widget\r\n![Embedded color picker widget, dark-themed](https://github.com/user-attachments/assets/ef1e87bb-9ba5-445a-aa94-54f4861abc06)\r\n```\r\nimport customtkinter\r\nfrom ctk_colorpicker_plus import CTkColorPicker\r\n\r\ndef on_color_change(hex_color: str):\r\n    print(f\"Color changed: {hex_color}\")\r\n\r\nroot = customtkinter.CTk()\r\npicker = CTkColorPicker(root, command=on_color_change)\r\npicker.pack(padx=20, pady=20)\r\n\r\nroot.mainloop()\r\n```\r\n\r\n---\r\n\r\n## Project Structure\r\n```\r\nctk_colorpicker_plus/\r\n    __init__.py\r\n    ctk_color_picker.py          # Modal dialog\r\n    ctk_color_picker_widget.py   # Embeddable widget\r\n    color_utils.py               # Shared color math and helpers\r\n    color_wheel.png\r\n    target.png\r\nexamples/\r\n    demo.py\r\n```\r\n\r\n---\r\n\r\n## Requirements\r\n- Python 3.8+\r\n- [CustomTkinter](https://github.com/TomSchimansky/CustomTkinter)\r\n- [Pillow](https://pypi.org/project/pillow/)\r\n\r\nInstall dependencies:\r\n```\r\npip install customtkinter Pillow\r\n```\r\n\r\n---\r\n\r\n## License\r\nThis project is released under the MIT License.\r\n> **Attribution:** Based on _CTkColorPicker_ by Akash Bora (Akasacape), originally released under CC0.\r\n\r\n---\r\n\r\n## Credits\r\n- **Original Author:** Akash Bora (Akascape) \u2014 [GitHub](https://github.com/Akascape)\r\n- **Maintainer:** Phil Rice - [GitHub](https://github.com/calusasoft)\r\n- **Contributors:** Victor Vimbert-Guerlais and the open source community\r\n",
    "bugtrack_url": null,
    "license": "MIT License\r\n        \r\n        Copyright (c) 2025 Phil Rice / The Rhys Group LLC\r\n        \r\n        Permission is hereby granted, free of charge, to any person obtaining a copy\r\n        of this software and associated documentation files (the \"Software\"), to deal\r\n        in the Software without restriction, including without limitation the rights\r\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n        copies of the Software, and to permit persons to whom the Software is\r\n        furnished to do so, subject to the following conditions:\r\n        \r\n        The above copyright notice and this permission notice shall be included in all\r\n        copies or substantial portions of the Software.\r\n        \r\n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n        SOFTWARE.\r\n        \r\n        ---\r\n        \r\n        This project is based on CTkColorPicker by Akash Bora (Akascape), originally\r\n        released under the Creative Commons Zero v1.0 Universal (CC0) license:\r\n        https://github.com/Akascape/CTkColorPicker\r\n        ",
    "summary": "Enhanced CustomTkinter color picker widget with bug fixes, hex input, and improved reticle/slider behavior.",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/calusasoft/ctk-colorpicker-plus",
        "Issues": "https://github.com/calusasoft/ctk-colorpicker-plus/issues",
        "Repository": "https://github.com/calusasoft/ctk-colorpicker-plus"
    },
    "split_keywords": [
        "customtkinter",
        " tkinter",
        " colorpicker",
        " color wheel",
        " gui"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "91a70000c7c56fe5239397bc23a42bc08bba713e88d15a6118f97a6ff2ad4734",
                "md5": "c5ddb7f75290e4508cbb266a468e68d6",
                "sha256": "0298e5fa6ff7776a9399902c0614b3dd46616fc0901735ed517ce66bdd1d898e"
            },
            "downloads": -1,
            "filename": "ctk_colorpicker_plus-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c5ddb7f75290e4508cbb266a468e68d6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 126458,
            "upload_time": "2025-08-13T18:42:54",
            "upload_time_iso_8601": "2025-08-13T18:42:54.621607Z",
            "url": "https://files.pythonhosted.org/packages/91/a7/0000c7c56fe5239397bc23a42bc08bba713e88d15a6118f97a6ff2ad4734/ctk_colorpicker_plus-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3b517d4355d61db623ae068d25f7b2a50be2054d30961e6a60459914d8a3dc7c",
                "md5": "45e7d3ce693cb54b121aadc2eabdbe25",
                "sha256": "e515e8dc766576d3d30c0ac08cbe75688993fb2635fa0e7c7908791a17c7b808"
            },
            "downloads": -1,
            "filename": "ctk_colorpicker_plus-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "45e7d3ce693cb54b121aadc2eabdbe25",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 127517,
            "upload_time": "2025-08-13T18:42:55",
            "upload_time_iso_8601": "2025-08-13T18:42:55.848501Z",
            "url": "https://files.pythonhosted.org/packages/3b/51/7d4355d61db623ae068d25f7b2a50be2054d30961e6a60459914d8a3dc7c/ctk_colorpicker_plus-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-13 18:42:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "calusasoft",
    "github_project": "ctk-colorpicker-plus",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ctk-colorpicker-plus"
}
        
Elapsed time: 0.93625s