It is done with Registry + atbroker to apply the change
Test in C++ :
int nActive = 1;
int nRet = SHSetValue(HKEY_CURRENT_USER, L"Software\\Microsoft\\ColorFiltering", L"Active", REG_DWORD, &nActive, sizeof(nActive));
ShellExecute(NULL, NULL, L"C:\\WINDOWS\\system32\\atbroker.exe", L"/colorfiltershortcut /resettransferkeys", NULL, SW_SHOWNORMAL);