@boddicker This is quite slow but appears to work:
-- toggle flux darkroom mode
tell application "System Events" to tell process "Flux"
tell menu bar item 1 of menu bar 1
click
click menu item "Color Effects" of menu 1
tell menu item "Color Effects" of menu 1
click menu item "Darkroom" of menu 1
end tell
end tell
end tell