I am trying to toggle the three settings in Ease of Access via the SystemParametersInfo API call.
For example, I can turn off Show animations in Windows (1) like this:
SystemParametersInfo(SPI_SETCLIENTAREAANIMATION, 0, (PVOID)false, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
And I can turn off the Show desktop background image (3) by calling:
SystemParametersInfo(SPI_SETDISABLEOVERLAPPEDCONTENT, 0, (PVOID)true, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);
However, I cannot find how to toggle Show transparency in Windows (2).
ref: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-systemparametersinfoa
I have tried to monitor API calls using API Monitor but without success. It shows the calls above but only calls to SPI_GETHIGHCONTRAST when transparency is toggled.
Does anyone know how to do it?

Change transparency option cause the following registry value change:
1: On,0: OffIf it helps you can achieve the purpose via writing registry key.
Note: Although it is possible technically, there is no official document about this. So it is not suggested to use in product environment.