Device background not following Live theme on load
I have set the 'Locked Patcher Background Color' of my Max for Live devices to the dynamic 'Device Background' (which is the default). For some reason, it is using the color of other themes. One. device uses the background color of a light theme, another of a dark theme, etc.
The color is correct when I open the device in Max and close it.
When I change themes in Live, the background color always follows the chosen theme.
All other [live.*] object colors are always correct. Only the background color does not work on first load.
Why is this, and what is the best way to fix it?
I see this in Max 8.6.2 (built-in) and 8.6.3 (full).
{
"version" : "Version 8.6.3 (315d8b011b7) (arm64 mac)",
"platform" : "mac",
"arch" : "arm64",
"osversion" : "Mac OS X Version 14.6 (Build 23G5052d) arm64",
"samplerate" : 48000,
"iovs" : 512,
"sigvs" : 64,
"scheduler_in_audio_interrupt" : "off",
"audio_drivername" : "Core Audio",
"audio_driver_subname" : "",
"license" : "permanent full",
"machine_id" : "8dce6371f97e3d8bcdfea4be228834fe",
"eventinterval" : 2,
"schedinterval" : 1.0,
"overdrive" : "on",
"pollthrottle" : 40,
"queuethrottle" : 100,
"sysqelemthrottle" : 1000,
"refreshrate" : 30.0,
"schedslop" : 25.0,
"eventprobing" : 1,
"mixerparallel" : "off",
"mixercrossfade" : 0,
"mixerlatency" : 30.0,
"mixerramptime" : 10.0,
"videoengine" : "avf",
"gfxengine" : "glcore",
"packages" : {
"BEAP" : "1.0.4",
"CNMAT Externals" : "1.0.5",
"gl3" : "0.3.3",
"hap" : "1.0.6",
"jit.mo" : "1.1.6",
"Jitter Tools" : "1.0.10",
"jk.push 2" : "2.0.3",
"Max for Live" : "1.0.9",
"Max for Live Research" : "1.0.7",
"max-mxj" : "8.2.0",
"maxforlive-elements" : "1.0.12",
"Mira" : "1.2.2",
"Node for Max" : "2.1.3",
"RivannisExample" : "",
"RNBO" : "1.2.6",
"VIDDLL" : "1.2.8",
"Virtual Sound Macros" : "",
"Vizzie" : "2.2.2"
}
}
I added the following code to the patch, and it works, although sometimes you see a short flickering when the color changes (which happens when the device was previously loaded in another theme).
The question remains as to why such a workaround is needed.

Happy to take a look at a patch/device to see if I can repro.
Here are some examples, older and newer ones.
To test, set Live to a light theme and load the device.
In my case, it's showing a grey background that is not the same as the background of the Live devices. It also happened that floating windows had yet another background color.
Then, switch to another theme. The device's color will most likely follow.
Restart Live with this other theme and still selected and load the device. I see the same result as in step 1.
3b. Instead of restarting Live, remove the device and change the theme. Then, load the device again. I often get the same result as in step 1, but not always.
3c. Instead of restarting Live or removing the device, load a second instance of the device (or another one of the devices). It will not have the same colors as the theme.
Changing the Live theme often has no effect on the second, third etc device.
3d. Deleting the multiple devices and not changing the theme also results in a wrong background color.
It's pretty reproducible but not 100% (hence the 'often'). I hope you can see it happen at least a few times.
I can reproduce some issues here, and I believe it has to do with locked_bgcolors in the patcher Styles that are saved with these devices.
For example, in the get selected parameter info [rvn].amxd
device, I see a patcher style called rvn
, which has a locked_bgcolor
of 0.305882352941176, 0.305882352941176, 0.305882352941176, 1.0. This appears to be overriding the Theme / Dynamic Colors, which actually seems appropriate. But in some cases, it is not, and the Theme is overriding the Style.
I was able to remove the styles from this device and the Theme / Dynamic Colors then appear to work as expected. Obviously this is not ideal and these two features should be able to coexist, so we will be looking into it.
Thanks for looking into it.
I do not quite understand the overriding part since the locked_bgcolor in the style is a dynamic color.
When I open the patch, all the colors, including the locked_bgcolor in the style, adjust to match the Live theme.
I recognize the color you mentioned as the device/background color of the Live themes I use(d) most of the time. Is this somehow still lingering in the patch?
I opened and saved a device in a light theme, and now it always loads with this light background. It's as if the dynamic color was saved as a fixed color when I saved the patch. And for some reason, the fixed color is sometimes used instead of the dynamic one. I don't know if both fixed and dynamic colors can coexist in the patch, though.
Yes, this was somehow saved in the patch and being used by the Style. I saw this by actually opening the amxd in a text editor and finding the Styles in the patcher json.
Thanks for your help tracking this bug down. Hopefully we can smooth these issues over in a future update.