summaryrefslogtreecommitdiff
path: root/src/macos.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/macos.m')
-rw-r--r--src/macos.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/macos.m b/src/macos.m
index 78b964ae..658acb05 100644
--- a/src/macos.m
+++ b/src/macos.m
@@ -684,3 +684,11 @@ void showPopupMenu_MacOS(iWidget *source, iInt2 windowCoord, const iMenuItem *it
684 } 684 }
685} 685}
686 686
687iColor systemAccent_Color(void) {
688 NSColor *accent = [[NSColor controlAccentColor] colorUsingColorSpace:
689 [NSColorSpace deviceRGBColorSpace]];
690 return (iColor){ iClamp([accent redComponent] * 255, 0, 255),
691 iClamp([accent greenComponent] * 255, 0, 255),
692 iClamp([accent blueComponent] * 255, 0, 255),
693 255 };
694}