textual-colorpicker
A color picker widget for Textual.
Installation
Install textual-colorpicker using pip:
pip install textual-colorpicker
Usage
textual-colorpicker provides a ColorPicker widget for use in Textual.
from textual.app import App, ComposeResult
from textual_colorpicker import ColorPicker
class ColorPickerApp(App):
CSS = """
Screen {
align: center middle;
}
"""
def compose(self) -> ComposeResult:
yield ColorPicker()
if __name__ == "__main__":
app = ColorPickerApp()
app.run()
Limitations
Textual apps run in the terminal, which work in terms of character cells rather than pixels. This means you obviously can't have the same fine-grained control with the mouse for this color picker as usual.
Contributing
I created this color picker widget as a learning exercise to better understand Textual and it is still a work in progress.
I'd really appreciate any feedback or suggestions, but I'm afraid I probably won't be accepting any PRs at the moment.
License
Licensed under the GNU General Public License v3.0.
Metadata
Release files for textual-colorpicker 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| textual_colorpicker-0.1.0.tar.gz | 21.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| textual_colorpicker-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.1 kB
Release files / textual_colorpicker-0.1.0.tar.gz
| Download URL | textual_colorpicker-0.1.0.tar.gz |
|---|---|
| Size | 21.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2996b0e486c0cbad24963522adf708e8e182776c0f7da0884cbed894a382966
|
|
BLAKE2b-256 checksum How to use checksums |
a25ededa4214e6bddb9c779d3a805f2021cdea74499a1f646d8bf64e84c15461
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / textual_colorpicker-0.1.0-py3-none-any.whl
| Download URL | textual_colorpicker-0.1.0-py3-none-any.whl |
|---|---|
| Size | 23.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d034b789eb5954a7aafb725f81815d83c90a42cfa80a4c4a0cb698f34f4ed18
|
|
BLAKE2b-256 checksum How to use checksums |
ba5ee6f4341c7ae01f2a79e083be242aa2040d09c22435e0f94e3e3770dca14b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|