https://github.com/marimo-team/gallery-examples/blob/main/notebooks/wigglystuff/paint.py
You can also draw over existing images with this library, this can be useful when interacting with multimodal LLMs.