rm-hull / luma.led_matrix

Python module to drive LED Matrices & 7-segment displays (MAX7219) and RGB NeoPixels (WS2812 / APA102)
https://luma-led-matrix.readthedocs.io
MIT License
521 stars 156 forks source link

even darker brightness & specific color #197

Closed qu-rn closed 5 years ago

qu-rn commented 5 years ago

I want to dim my neopixel display as much as possible. As brightness is still to bright when setting contrast to "1" with

device.contrast(1)

Can I dim the brightness even more when I've already set contrast to "1"?

Do I have a possibility to change the color in an other way than with the limited amount of presets, e.g.

draw.point((x, y), fill="red")

I'd love to enter a specific rgb value, resulting in a darker red with a lower number (e.g. 100,0,0). This would also solve my first problem.

Can I change the color to a specific rgb value?

Thanks

rm-hull commented 5 years ago

Yes, you can use an RGB triple instead of passing a color name. See https://github.com/rm-hull/luma.led_matrix/blob/master/examples/neopixel_demo.py#L172 for example.

Note that the draw canvas is just a pillow ImageDraw instance, so you can manipulate it any way pillow allows you to.