Skip to main content

A color picker widget for Textual

Project description

textual-colorpicker

A color picker widget for Textual.

screenshot

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textual_colorpicker-0.1.0.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

textual_colorpicker-0.1.0-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file textual_colorpicker-0.1.0.tar.gz.

File metadata

  • Download URL: textual_colorpicker-0.1.0.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for textual_colorpicker-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c2996b0e486c0cbad24963522adf708e8e182776c0f7da0884cbed894a382966
MD5 e793c8ba4e501383d5fb594f1da97deb
BLAKE2b-256 a25ededa4214e6bddb9c779d3a805f2021cdea74499a1f646d8bf64e84c15461

See more details on using hashes here.

File details

Details for the file textual_colorpicker-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for textual_colorpicker-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d034b789eb5954a7aafb725f81815d83c90a42cfa80a4c4a0cb698f34f4ed18
MD5 ecd6b1e9dc097d1d1782f2486a321ff7
BLAKE2b-256 ba5ee6f4341c7ae01f2a79e083be242aa2040d09c22435e0f94e3e3770dca14b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page