Update custom color palettes with JSON command?

Is this possible?

Use case: At parties/events, I want to run a sound reactive music visualizer to create visuals to whatever music is on, and project that on to surfaces with projectors. I want to screen capture that visualizer somehow (HDMI split or screengrabber from whatever’s running the visualizer) and run some program (unknown atm) to analyze the principle colors in the visualizer every say 5 seconds or so, create a color palette based on the colors and their relative proportions in the visualizer at that time, automatically generate a json compatible color palette, send it to my “master” WLED unit to which the rest are synched, and update the current custom color palette (example: palette0). Then, slightly offset in timing, I’d send another JSON command to choose palette0 every 5 seconds which would then activate the new colors that were just installed. In my brain, theoretically, if I have a few seconds transition enabled, then the colors should adaptively change without any noticeable disruptions and with an accuracy of about 5 seconds, reflect the colors of the visualizer. Because I’m not trying to sync the animations, just the color palette, im not super worried about latency / frame accuracy.

Tell me what doesnt work, and please provide any guidance on how to facilitate this that may come to mind.

Current set up:
10-20 (depends on the night) WLED set ups on DigUnos
Connected to Router and
Home Assistant Green running some custom cards I made to control a few “master” WLEDs that then send various looks and playlists out to relevant units.

Weaknesses:
Not a coder/programmer. Barely scraped through to understand how JSON works, anything more complex is the moon to me.

Strengths:
Plucky and determined, good understanding of I/O, thinks outside box. Cheers!

Custom palettes cannot be changed on the fly (dynamically).
The can be changed but they need to be saved to file system first and then loaded from it. This takes time and CPU power.

If you want to do it a couple of times per minute then go ahead, API is there (look at the source).
If you want to do it several times per second then you are out of luck. Can’t be done with current implementation. But audioreactive usermod in 0.15 does feature 3 custom audio reactive palettes.