CocoaImpl // Check whether "AppleAccentColor" is specified.

This commit is contained in:
ShikiSuen 2023-11-30 09:41:59 +08:00
parent 2f81bd5824
commit 274534b0f2
1 changed files with 8 additions and 0 deletions

View File

@ -319,3 +319,11 @@ public extension NSRunningApplication {
return .init(hue: h, saturation: s, brightness: 128, alpha: 1)
}
}
// MARK: - Check whether system's accent color is fixed with non-default value.
public extension NSApplication {
var isAccentColorCustomized: Bool {
UserDefaults.standard.object(forKey: "AppleAccentColor") != nil
}
}