# ControlP5 in py5

**URL:** <https://discourse.processing.org/t/controlp5-in-py5/45799>\
**Category:** py5\
**Created:** [February 19, 2025, 5:24pm UTC](https://discourse.processing.org/t/controlp5-in-py5/45799 "2025-02-19T17:24:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![villares](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/villares/32/3166_2.png) [@villares](https://discourse.processing.org/u/villares)\
**Post date:** [February 25, 2026, 2:23pm UTC](https://discourse.processing.org/t/controlp5-in-py5/45799/2 "2026-02-25T14:23:21Z")

</div>

This is so cool, @svan! I love this, thank you for sharing it.

With the `py5_tools.processing.download_library()` feature it becomes even easier to use it, you don’t have to manually copy the `jar` file!

Check out my attempt at simplifying a bit the sketch:

![peek_1](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/7/e7a440cd650ce99d97966cc3c8b1b616c39915f2.gif)

```python
# Uses Imported mode for py5, learn more at <py5coding.org>

# To install the ControlPy5 .jar, you only need the following two lines once
from py5_tools.processing import download_library
print(download_library('ControlP5')) # printed to see details of how it went

from controlP5 import ControlP5 # on module mode, this must come after import py5

def setup():
    global slider, cw
    size(450, 450)

    window_title("DotView Demo") 
    this = get_current_sketch()
    cp5 = ControlP5(this)
    slider = cp5.addSlider("slider", 0, 255, 50, 30, 10, 200, 20)
    cw = cp5.addColorWheel("c", 300,10,100)
    cw.setRGB(color(128,0,255))
 
def draw():
    background(209)
    fill(cw.getRGB())
    circle(200, 220, slider.getValue())

```

---

_[View the full topic](https://discourse.processing.org/t/controlp5-in-py5/45799)._
