qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
18.24k stars 39.3k forks source link

RGBW White #2834

Closed JulioBBL closed 2 years ago

JulioBBL commented 6 years ago

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?

drashna commented 6 years ago

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

JulioBBL commented 6 years ago

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

drashna commented 6 years ago

Ah, yeah, that would be a problem.

What strip/LEDs are you using?

JulioBBL commented 6 years ago

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

drashna commented 6 years ago

Any updates to this?

Taudris commented 5 years ago

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.

kraigh commented 5 years ago

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

stale[bot] commented 4 years ago

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.

drashna commented 4 years ago

Stalebot bad.

spidey3 commented 4 years ago

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...

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale 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. For maintainers: Please label with bug, in progress, on hold, discussion or to do to prevent the issue from being re-flagged.

tzarc commented 2 years ago

Closing due to inactivity.