SwiftUI Color.blue
.blueComplete technical specification and developer reference for Blue in Apple's SwiftUI design system. In light appearance, it resolves to HEX #0088FF; in dark appearance, it dynamically adapts to HEX #0091FF. Features wide-gamut Display P3 values, UIKit bridge (UIColor.systemBlue), AppKit bridge (NSColor.systemBlue), WCAG contrast audit, and Xcode drop-in initializers.
SwiftUI's adaptable blue.
Color.blueColor(red: 0.000, green: 0.533, blue: 1.000)Color(red: 0.000, green: 0.533, blue: 1.000, opacity: 1.00)Color(hue: 0.578, saturation: 1.000, brightness: 1.000, opacity: 1.00)Color(.displayP3, red: 0.231, green: 0.525, blue: 0.969, opacity: 1.00)Color(.sRGB, red: 0.000, green: 0.533, blue: 1.000, opacity: 1.00)Color(hex: "#0088FF")#colorLiteral(red: 0.000, green: 0.533, blue: 1.000, alpha: 1.00)Color(uiColor: UIColor(red: 0.000, green: 0.533, blue: 1.000, 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 | #0088FF | #0091FF | Color(hex: "#0088FF") |
| sRGB (0–255) | rgb(0, 136, 255) | rgb(0, 145, 255) | (r: 0.000, g: 0.533, b: 1.000) |
| Display P3 (Wide Gamut) | P3 (0.231, 0.525, 0.969) | P3 (0.247, 0.561, 0.969) | Color(.displayP3, ...) |
| HSL / HSB | hsl(208, 100%, 50%) | hsl(206, 100%, 50%) | Color(hue:sat:bri:) |
| Platform Bridge | UIKit: UIColor.systemBlue | AppKit: NSColor.systemBlue | Color(uiColor:) / Color(nsColor:) |
Light Appearance
#0088FFrgb(0, 136, 255)hsl(208, 100%, 50%)(r: 0.000, g: 0.533, b: 1.000)Dark Appearance
#0091FFrgb(0, 145, 255)hsl(206, 100%, 50%)(r: 0.000, g: 0.569, b: 1.000)Drop-In Developer Snippets
Ready-to-paste code blocks for Xcode asset catalogs and Swift files.
Contents.json inside Assets.xcassets/Blue.colorset/{
"colors": [
{
"color": {
"color-space": "srgb",
"components": {
"red": "0.000",
"green": "0.533",
"blue": "1.000",
"alpha": "1.000"
}
},
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"color": {
"color-space": "srgb",
"components": {
"red": "0.000",
"green": "0.569",
"blue": "1.000",
"alpha": "1.000"
}
},
"idiom": "universal"
}
],
"info": {
"author": "xcode",
"version": 1
}
}Live UI Component Sandbox
Preview Color.blue inside standard Apple interface components.
●SwiftUI Notification
Just nowDemonstrates how Apple designers pair system background tints with dynamic Blue accents.
.foregroundStyle(.blue)
Platform Implementation Snippets
Ready-to-use Swift code for SwiftUI, UIKit, and AppKit applications.
// Standard SwiftUI Usage
Text("Hello, Apple")
.foregroundStyle(Color.blue)
// Background & Shape Fill
RoundedRectangle(cornerRadius: 16)
.fill(Color.blue)
.frame(width: 200, height: 50)
// Prominent Action Button
Button("Confirm Action") {
// Action
}
.buttonStyle(.borderedProminent)
.tint(Color.blue)WCAG 2.1 Accessibility Contrast Audit
Contrast calculations of Blue against pure white and iOS OLED dark surfaces.
Recommended HIG Use Cases
- Standard interactive links and buttons
- Selection outlines and focus rings
- Primary brand-neutral accents
Anti-Patterns to Avoid
- Destructive actions or warning signals
- Static unlinked decorative text
Browse More SwiftUI Colors
Quickly jump to other Apple system colors and semantic tokens.
Frequently Asked Questions
How do I use Color.blue in SwiftUI?
In SwiftUI, apply the color directly using view modifiers like .foregroundStyle(.blue), .tint(.blue), or .background(.blue). You can also instantiate it via Color.blue.
What is the HEX code for SwiftUI Blue in light and dark mode?
In light appearance, SwiftUI Blue resolves to #0088FF. In dark appearance, it automatically adapts to #0091FF.
What is the UIKit and AppKit equivalent of SwiftUI Color.blue?
The UIKit equivalent is UIColor.systemBlue (accessible in SwiftUI via Color(uiColor: .systemBlue)). The AppKit equivalent is NSColor.systemBlue (accessible via Color(nsColor: .systemBlue)).
Does SwiftUI Color.blue adapt automatically to dark mode?
Yes, Color.blue is a dynamic Apple system token that automatically updates between light (#0088FF) and dark (#0091FF) appearances when the system appearance changes.
What is the Display P3 and sRGB value of Color.blue?
Color.blue uses resolved sRGB values (#0088FF in light, #0091FF in dark) and supports wide color gamut Display P3 coordinates for high-fidelity rendering on Apple Retina displays.