How can I set system-wide grayscale with exception of some apps?
This cannot be done.
Greyscale in Accessibility is in effect an 'overlay' or filter for the entire screen. It is done right at the point the image is sent to be drawn by your GPU. No app is even aware it is set.
You can very easily test this by switching on greyscale &amp; taking a screenshot.
Switch off greyscale again &amp; look at the shot you took - it's in colour.