CFStringRef colorRedKey = CFSTR("colorRed");
CFStringRef alphaPreviewCustomKey = CFSTR("alphaPreviewCustom");
CFNumberRef outVal;
// Here we tell CoreFoundation what type of number this is
outVal = CFNumberCreate(NULL, kCFNumberFloat32Type, &displayColor[0]);
CFPreferencesSetAppValue(colorRedKey, outVal, appName);
CFRelease(outVal);
if (gAlphaPreviewImageCustom) {
CFPreferencesSetAppValue(alphaPreviewCustomKey, kCFBooleanTrue, appName);
} else {
CFPreferencesSetAppValue(alphaPreviewCustomKey, kCFBooleanFalse, appName);
}
// Force the changes to be saved to disk immediately
(void)CFPreferencesAppSynchronize(appName);