A color picker widget for Textual.
Install textual-colorpicker using pip:
pip install textual-colorpicker
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()
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.
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.
Licensed under the GNU General Public License v3.0.