Please, help to understand is it possible to make my own color scheme?
For example, I want to use amber, yellow or pure cyan LEDs, perhaps with the original RGB channels, is it possible to implement this in code. Which files are responsible for this? How do I provide my color scheme to the interface?
no. bus manager is low level pixel interface. it has nothing to do with colors.
If you mean color palette when you say “color scheme” those are in separate .h file. You can mangle them as much as you like but beware that integrations may look weird in such case.
I want to try to implement some really strange things
I wouldn’t be too embarrassed if it looks weird in code
Now I want to try to connect the UV-strip as channel 4 and make it look “normal” on existing presets
Yep, techically I understand. I can say more, Im using DMX with my slightly modified firmware)
But it’s not an RGBW scheme, but RGB+UV and the existing presets won’t work the way I want. I need my own interpolation (RGBW / RGB → RGB+UV) and I want to figure out where to implement it in code.
The RGB+UV color space is also not a simple RGB/RGBA. Existing out-of-the-box presets will work oddly with it, but I want to achieve some consistency without hacks. But your idea is brilliant, thank you, in case of I not succeeded I’ll try that
Unfortunately the best I can give you is make your own auto-white calculation (bus_manager) to control W channel from RGB values. How? I have no idea.
Since UV is not a color in normal terms I still think the best way is to create (a) custom effect(s) that know how to handle W channel as UV and then use manual white control. A bit tedious I admit but IMO the only proper way.
This tip looks nice!
I guess I’m more interested in “where” than “how.”. I want to understand how the concept of “color” is formed and how this value is given to the channels. It turns out that the bus manager is responsible for this? I have already looked at it, it seems that there is a choice between strips and PWM.
So 4th and 5th channels are calculated automatically for some layouts — rgbw/rgbwn?
Thank you @blazoncek, you understand better than anyone how it works.
I’m talking about code, not about color theory
by the way, I’m familiar with color spaces and color transformations — have a lot of experience in computer graphics
I probably imagined that there is some class that “technically correctly” converts color to RGBW/RGBWN. I see that the white channel is a bit hard-coded for this conversion in the code. Maybe better starting point was an explanation how RGBW/RGBWN code works in WLED? And how it related to presets / color wheel / palettes?
Reading your posts it seems you wanted information on how colors are constructed.
R+G+B emitting light sources will produce different hues of color depending on the amount of each primary.
There is no mention of UV in that regards. You cannot reproduce UV with RGB. Period.
If you want to include UV in your effects there is no way you can achieve that with whatever is in WLED ATM.
Also, all UV LEDs I’ve come across are analog which means you will need to treat them as PWM 1 channel LEDs as far as WLED is concerned. As such they can be controlled using separate White channel (in WLED terms) which WLED supports. Still, WLED has the ability to automatically calculate amount of white in particular RGB combination if you want automatic white calculation. But this is assuming RGB values (which produce shades of white if all of them are equal).
If we go back to your original request: There is no way to automatically generate UV part of color spectrum using whatever is built into WLED. If you want UV in your effects you will need to program it yourself using White channel as a means to activate UV LEDs.
You don’t have to explain to me how colors work. I know. You know too, I’ve seen it in code.
I’m not asking you “can you implement RGB+UV” - I want to implement it myself. At this point, I barely understand how color conversion works in WLED, where the source of rgbw layouts — Is there a color managment system in code?
I’m asking about the code. How does WLED do white in rgbw/rgbwn layouts (and why is it so hardcoded), where can I find the transformation, does it depend on rgb, do you use linear spaces, LUTs and many other code related questions (and only then about color). I understand I can’t require you to do this in code, but I would expect there to be a clear strategy about color and how it is displayed and I was hoping I could get an explanation of how it works in code
There was an idea to implement some kind of color management. But your explanations don’t explain anything, but now I have a lack of confidence that this is a good idea.
I can’t understand why It so hard to explain.
I’ll come back when I read the source to be clearer.
no. bus manager is low level pixel interface. it has nothing to do with colors.
You said the bus manager is a low-level pixel interface, but why does it have a hard-coded cct color conversion? Or am I wrong? If it were transparent and clear, I wouldn’t ask.