Apologies if this has been explained somewhere but I didn't see it in the manual or beta announcement:
I'm trying the palette control added in beta 13.7.1. It's a great addition!
When setting the palette's type to "default", how do I set the default color to be used?
The default color would come from somewhere else. The palette control will tell you the user chose the default option, and it’s up to you what that means.
(If doesn’t always / have to mean a color. It could mean a behavior, or delegation to having things rendered by something else.)
You can change the label or remove it entirely, but you can't put your own custom color there.
Choosing it is like saying "no color / I don't want to choose or change this color", not selecting any particular color. The color you get will often depend on something else, which may be outside of Opus and tied to the operating system version/theme.
Is there a difference between this and using the control with "Can disable" and then unchecking the checkbox?
Yes, I appreciate that this is how the control is used in opus settings. But I imagine there will be many use cases unrelated to DOpus theming. In my case, I'm replacing colors in an svg file and was hoping to use this to go back to the value given when the dialog was opened. Anyway, it's not important, there are other ways to achieve that. I'm happy the control is available.
The main difference is the checkbox requires you to save and load a separate boolean value along with the color.
The reason we have two different methods in Opus is because some colors support alpha and some don't. Colors that don't support alpha are able to use the alpha byte as a flag to indicate enabled/disabled, but colors that support alpha use the full 32 bits and so need a separate flag for on/off state.