public NSColor LoadColor(string key, NSColor defaultValue) { // Attempt to read color, add the language ID to make unique var hex = NSUserDefaults.StandardUserDefaults.StringForKey(LanguageIdentifier + key); // Take action based on value if (hex == null) { return defaultValue; } else { return NSColorFromHexString (hex); } }