SwiftUI Color.indigo
.indigoComplete technical specification and developer reference for Indigo in Apple's SwiftUI design system. In light appearance, it resolves to HEX #6155F5; in dark appearance, it dynamically adapts to HEX #6D7CFF. Features wide-gamut Display P3 values, UIKit bridge (UIColor.systemIndigo), AppKit bridge (NSColor.systemIndigo), WCAG contrast audit, and Xcode drop-in initializers.
SwiftUI's adaptable indigo.
Color.indigoColor(red: 0.380, green: 0.333, blue: 0.961)Color(red: 0.380, green: 0.333, blue: 0.961, opacity: 1.00)Color(hue: 0.679, saturation: 0.653, brightness: 0.961, opacity: 1.00)Color(.displayP3, red: 0.373, green: 0.333, blue: 0.925, opacity: 1.00)Color(.sRGB, red: 0.380, green: 0.333, blue: 0.961, opacity: 1.00)Color(hex: "#6155F5")#colorLiteral(red: 0.380, green: 0.333, blue: 0.961, alpha: 1.00)Color(uiColor: UIColor(red: 0.380, green: 0.333, blue: 0.961, 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 | #6155F5 | #6D7CFF | Color(hex: "#6155F5") |
| sRGB (0–255) | rgb(97, 85, 245) | rgb(109, 124, 255) | (r: 0.380, g: 0.333, b: 0.961) |
| Display P3 (Wide Gamut) | P3 (0.373, 0.333, 0.925) | P3 (0.439, 0.486, 0.969) | Color(.displayP3, ...) |
| HSL / HSB | hsl(245, 89%, 65%) | hsl(234, 100%, 71%) | Color(hue:sat:bri:) |
| Platform Bridge | UIKit: UIColor.systemIndigo | AppKit: NSColor.systemIndigo | Color(uiColor:) / Color(nsColor:) |
Light Appearance
#6155F5rgb(97, 85, 245)hsl(245, 89%, 65%)(r: 0.380, g: 0.333, b: 0.961)Dark Appearance
#6D7CFFrgb(109, 124, 255)hsl(234, 100%, 71%)(r: 0.427, g: 0.486, b: 1.000)Drop-In Developer Snippets
Ready-to-paste code blocks for Xcode asset catalogs and Swift files.
Contents.json inside Assets.xcassets/Indigo.colorset/{
"colors": [
{
"color": {
"color-space": "srgb",
"components": {
"red": "0.380",
"green": "0.333",
"blue": "0.961",
"alpha": "1.000"
}
},
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"color": {
"color-space": "srgb",
"components": {
"red": "0.427",
"green": "0.486",
"blue": "1.000",
"alpha": "1.000"
}
},
"idiom": "universal"
}
],
"info": {
"author": "xcode",
"version": 1
}
}Live UI Component Sandbox
Preview Color.indigo inside standard Apple interface components.
●SwiftUI Notification
Just nowDemonstrates how Apple designers pair system background tints with dynamic Indigo accents.
.foregroundStyle(.indigo)
Platform Implementation Snippets
Ready-to-use Swift code for SwiftUI, UIKit, and AppKit applications.
// Standard SwiftUI Usage
Text("Hello, Apple")
.foregroundStyle(Color.indigo)
// Background & Shape Fill
RoundedRectangle(cornerRadius: 16)
.fill(Color.indigo)
.frame(width: 200, height: 50)
// Prominent Action Button
Button("Confirm Action") {
// Action
}
.buttonStyle(.borderedProminent)
.tint(Color.indigo)WCAG 2.1 Accessibility Contrast Audit
Contrast calculations of Indigo against pure white and iOS OLED dark surfaces.
Recommended HIG Use Cases
- Creative tools and audio production apps
- Distinct secondary tags in multi-category lists
- High-contrast badges and chips
Anti-Patterns to Avoid
- Very dark background fills in dark mode
Browse More SwiftUI Colors
Quickly jump to other Apple system colors and semantic tokens.
Frequently Asked Questions
How do I use Color.indigo in SwiftUI?
In SwiftUI, apply the color directly using view modifiers like .foregroundStyle(.indigo), .tint(.indigo), or .background(.indigo). You can also instantiate it via Color.indigo.
What is the HEX code for SwiftUI Indigo in light and dark mode?
In light appearance, SwiftUI Indigo resolves to #6155F5. In dark appearance, it automatically adapts to #6D7CFF.
What is the UIKit and AppKit equivalent of SwiftUI Color.indigo?
The UIKit equivalent is UIColor.systemIndigo (accessible in SwiftUI via Color(uiColor: .systemIndigo)). The AppKit equivalent is NSColor.systemIndigo (accessible via Color(nsColor: .systemIndigo)).
Does SwiftUI Color.indigo adapt automatically to dark mode?
Yes, Color.indigo is a dynamic Apple system token that automatically updates between light (#6155F5) and dark (#6D7CFF) appearances when the system appearance changes.
What is the Display P3 and sRGB value of Color.indigo?
Color.indigo uses resolved sRGB values (#6155F5 in light, #6D7CFF in dark) and supports wide color gamut Display P3 coordinates for high-fidelity rendering on Apple Retina displays.