Setting Button Background Color via Command?

I don't think there is. Not my area of expertise, though :wink:

@if gets evaluated at runtime, so the second @label overwrites the first one.

Try

@label:IsEnabled("Set DARKMODE=on") ? "Test - Dark On" : "Test - Dark Off"