WLED icon indicating copy to clipboard operation
WLED copied to clipboard

[Feature request] Support setting color temperature in mireds or kelvin

Open frenck opened this issue 7 years ago • 5 comments

I would love to see added support for setting a color temperature in mireds or kelvin.

This can be calculated (approximatively) for both RGB & RGBW strips.

Background information:

http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/

The above will give an RGB, this can be calculated to RGBW like this:

https://github.com/home-assistant/home-assistant/blob/master//homeassistant/util/color.py#L403

frenck avatar Oct 27 '19 20:10 frenck

Good idea! I will implement both a CT slider for the UI as well as a topic to set it from HA!

Aircoookie avatar Oct 27 '19 21:10 Aircoookie

Interested in this as well as color-correction! ;)

tonyn0 avatar Jan 01 '20 00:01 tonyn0

Small update on this, since it has been requested :)

A color temperature slider has been added in 0.11.0, setting a Kelvin value via API is already supported since build 2009260, e.g. "col":[[2700]] for warm white.

Still TODO:

  • Add this information to the API documentation
  • Right now Kelvin is converted to RGB (and only then to RGBW, if enabled). A different conversion method might be possible for RGBW units, which makes more use of the relatively high-CRI extra white channel.

Aircoookie avatar Aug 31 '21 21:08 Aircoookie

If there will be changes to CWW logic, it would be good idea to add channel temperature (PWM CW & PWM RGBWW) in LED preferences page.

blazoncek avatar Sep 01 '21 06:09 blazoncek

Setting CCT in Kelvin implemented since 624993fc89266f4c206faeec535b542f52654519. Behaviour explained in KB.

blazoncek avatar Oct 10 '22 06:10 blazoncek