Re: [Module] LED - Gadget (all OS)
Posted: Tue Apr 07, 2020 10:42 am
Thanks, mk-soft. On my iMac the following works:
Do you know if the blend values are different on different Macs or with standard colors always the same?
Code: Select all
Procedure OSX_GadgetColor()
Define.i UserDefaults, NSString
UserDefaults = CocoaMessage(0, 0, "NSUserDefaults standardUserDefaults")
NSString = CocoaMessage(0, UserDefaults, "stringForKey:$", @"AppleInterfaceStyle")
If NSString And PeekS(CocoaMessage(0, NSString, "UTF8String"), -1, #PB_UTF8) = "Dark"
ProcedureReturn BlendColor_(OSX_NSColorByNameToRGB("controlBackgroundColor"), #White, 82)
Else
ProcedureReturn BlendColor_(OSX_NSColorByNameToRGB("windowBackgroundColor"), #White, 85)
EndIf
EndProcedure