The easiest way is to just call to the
Queries the background color via:
CycleBackgroundColor
runtimeCommand over and over to run through the presets. It in turns calls to the cycleBackgroundColor.mel
script, which:Queries the background color via:
float $rgb[3] = `displayRGBColor -query background`;Queries if the gradient is on via:
int $gradOn = `displayPref -q -displayGradient`;Turns the gradient on/off via:
displayPref -displayGradient 1; // or 0And changes the colors via presets with:
displayRGBColor background 0.36 0.36 0.36;//default color