macOS System Purple
NSColor.systemPurpleComplete technical specification and developer reference for System Purple in Apple's macOS design system. In light appearance, it resolves to HEX #CB30E0; in dark appearance, it dynamically adapts to HEX #DB34F2. Features wide-gamut Display P3 values, UIKit bridge (UIColor.systemPurple), AppKit bridge (NSColor.systemPurple), WCAG contrast audit, and Xcode drop-in initializers.
A purple color that automatically adapts to the current appearance.
ColorNSColor.systemPurpleColor(red: 0.796, green: 0.188, blue: 0.878)Color(red: 0.796, green: 0.188, blue: 0.878, opacity: 1.00)Color(hue: 0.813, saturation: 0.786, brightness: 0.878, opacity: 1.00)Color(.displayP3, red: 0.733, green: 0.243, blue: 0.851, opacity: 1.00)Color(.sRGB, red: 0.796, green: 0.188, blue: 0.878, opacity: 1.00)Color(hex: "#CB30E0")#colorLiteral(red: 0.796, green: 0.188, blue: 0.878, alpha: 1.00)Color(uiColor: UIColor(red: 0.796, green: 0.188, blue: 0.878, alpha: 1.00))Technical Color Specifications
Exact resolved HEX codes, sRGB 8-bit components, HSL, and normalized Swift floating-point decimals for Light and Dark modes.
| Color Metric / Space | Light Appearance | Dark Appearance | Swift Code Literal |
|---|---|---|---|
| HEX Code | #CB30E0 | #DB34F2 | Color(hex: "#CB30E0") |
| sRGB (0–255) | rgb(203, 48, 224) | rgb(219, 52, 242) | (r: 0.796, g: 0.188, b: 0.878) |
| Display P3 (Wide Gamut) | P3 (0.733, 0.243, 0.851) | P3 (0.792, 0.263, 0.918) | Color(.displayP3, ...) |
| HSL / HSB | hsl(293, 74%, 53%) | hsl(293, 88%, 58%) | Color(hue:sat:bri:) |
| Platform Bridge | UIKit: UIColor.systemPurple | AppKit: NSColor.systemPurple | Color(uiColor:) / Color(nsColor:) |
Light Appearance
#CB30E0rgb(203, 48, 224)hsl(293, 74%, 53%)(r: 0.796, g: 0.188, b: 0.878)Dark Appearance
#DB34F2rgb(219, 52, 242)hsl(293, 88%, 58%)(r: 0.859, g: 0.204, b: 0.949)Drop-In Developer Snippets
Ready-to-paste code blocks for Xcode asset catalogs and Swift files.
Contents.json inside Assets.xcassets/System Purple.colorset/{
"colors": [
{
"color": {
"color-space": "srgb",
"components": {
"red": "0.796",
"green": "0.188",
"blue": "0.878",
"alpha": "1.000"
}
},
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"color": {
"color-space": "srgb",
"components": {
"red": "0.859",
"green": "0.204",
"blue": "0.949",
"alpha": "1.000"
}
},
"idiom": "universal"
}
],
"info": {
"author": "xcode",
"version": 1
}
}Live UI Component Sandbox
Preview Color.system purple inside standard Apple interface components.
●SwiftUI Notification
Just nowDemonstrates how Apple designers pair system background tints with dynamic System Purple accents.
.foregroundStyle(NSColor.systemPurple)
Platform Implementation Snippets
Ready-to-use Swift code for SwiftUI, UIKit, and AppKit applications.
// AppKit (macOS)
let button = NSButton()
button.contentTintColor = NSColor.systemPurple
// Custom Layer Tint
let layer = CALayer()
layer.backgroundColor = NSColor.systemPurple.cgColor
// Bridging AppKit into SwiftUI
let swiftUIColor = Color(nsColor: .systemPurple)WCAG 2.1 Accessibility Contrast Audit
Contrast calculations of System Purple against pure white and iOS OLED dark surfaces.
Recommended HIG Use Cases
- AppKit accent highlights and badges
- State indicators and notification tags
- Sidebar icons and custom accessory views
Anti-Patterns to Avoid
- Unstyled plain paragraph text
- Full window backgrounds
Browse More macOS Colors
Quickly jump to other Apple system colors and semantic tokens.
Frequently Asked Questions
How do I use NSColor.systemPurple in macOS AppKit apps?
In AppKit, assign NSColor.systemPurple to NSView, NSTextField, or NSButton styling. In SwiftUI on macOS, bridge it using Color(nsColor: .systemPurple).
What is the HEX code for macOS System Purple in light and dark mode?
In light appearance, System Purple resolves to #CB30E0. In dark appearance, it automatically adapts to #DB34F2.
How do I bridge NSColor.systemPurple into SwiftUI?
In SwiftUI views on macOS, instantiate Color(nsColor: .systemPurple) to access the native AppKit dynamic color token.
Does System Purple adapt to Dark Mode and vibrancy in macOS?
Yes, NSColor.systemPurple is an appearance-aware NSColor that updates automatically when switching between light and dark modes or across vibrant desktop materials.
Why use AppKit system colors instead of hardcoded hex values?
NSColor system tokens adapt automatically to user accent color preferences, Dark Mode, and accessibility contrast settings.