Can I change a Numbers spreadsheet's sheet background color via AS?

I am using the script provided here:

but my original sheet has a dark background color and when I use the script shared above, the background is white. Can I change the sheet’s background color via AS?
I know how to change it manually by going to Format > Sheet > Background, but I would like to do it all with the same script, if possible.

Thanks

tell application "Numbers"
	tell its document "my document.numbers"
		tell its sheet "Sheet 1"
			tell its table "Table 1"
				set background color of cell range to {45232, 46003, 45745} --RGB values
			end tell
		end tell
	end tell
end tell
1 Like

Thank you for sharing.
Unfortunately, I’m trying to change the color of the sheet itself, not the table.
Similar to when we unselect all tables and then click here:
image

Thanks for sharing.

I ended up going with another solution which was to duplicate the original sheet with the background color I want and then just copying the table itself to the duplicates. It’s simpler and faster.

I will save your script anyway, because it uses the radio buttons and all that, which I still don’t know how it works. Always a way to learn a bit more.

Question: your script would basically just open the Color Wheel, right?
I was trying to change the color automatically, anyway, by adding the value to the script and it would do it the same way we can change the color of a cell.
But I guess that’s not even possible at all.