Qmk_firmware: RGBW White

Created on 28 Apr 2018  路  10Comments  路  Source: qmk/qmk_firmware

i haven't found anywhere explaining how to activate the white channel on a RGBW led, am i not looking in the right place or there is no implemented way?

good first issue help wanted question to do

Most helpful comment

QMK doesn't have any real support for the W in RGBW. The only thing it can do is send commands to RGBW LEDs and have the correct RGB color show up.

I got RGBW working on my personal keymap by putting RGBLIGHT_CUSTOM_DRIVER = yes in rules.mk and defining a custom rgblight_set() that creates a copy of led (global variable which stores current LED values), then does some math to "convert" RGB to RGBW (find min channel value, subtract from RGB, add to W). This way, white can be controlled/blended with RGB by QMK's saturation controls.

All 10 comments

Depending on what you're trying to do, the RGB underglow code should handle this automatically, I think.

https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h#L20

But it sends tre values, for R, G and B respectivelly, but no value for W. I don鈥檛 know if it will send a (0, 0, 0, 255) or a (255, 255, 255), and the latter seems more likelly, but i couldn鈥檛 find code that parses it to a true white signal, and that is why i am here asking

Ah, yeah, that would be a problem.

What strip/LEDs are you using?

I am still planning my build, got an order for some SK6812, but still waiting to see if I can use the pure white

Any updates to this?

QMK doesn't have any real support for the W in RGBW. The only thing it can do is send commands to RGBW LEDs and have the correct RGB color show up.

I got RGBW working on my personal keymap by putting RGBLIGHT_CUSTOM_DRIVER = yes in rules.mk and defining a custom rgblight_set() that creates a copy of led (global variable which stores current LED values), then does some math to "convert" RGB to RGBW (find min channel value, subtract from RGB, add to W). This way, white can be controlled/blended with RGB by QMK's saturation controls.

@Taudris would you be willing to share your custom rgblight_set()? Maybe even contribute it to QMK?

This issue has been automatically marked as resolved because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs.

Stalebot bad.

Here is an article listing a potential algorithm to use to convert HSV to RGBW:
https://blog.saikoled.com/post/44677718712/how-to-convert-from-hsi-to-rgb-white

Note - there really is no good way to go from RGB to RGBW...

Was this page helpful?
0 / 5 - 0 ratings