SwiftUI Color.red
.redComplete technical specification and developer reference for Red in Apple's SwiftUI design system. In light appearance, it resolves to HEX #FF383C; in dark appearance, it dynamically adapts to HEX #FF4245. Features wide-gamut Display P3 values, UIKit bridge (UIColor.systemRed), AppKit bridge (NSColor.systemRed), WCAG contrast audit, and Xcode drop-in initializers.
SwiftUI's adaptable red.
Color.redColor(red: 1.000, green: 0.220, blue: 0.235)Color(red: 1.000, green: 0.220, blue: 0.235, opacity: 1.00)Color(hue: 0.997, saturation: 0.780, brightness: 1.000, opacity: 1.00)Color(.displayP3, red: 0.922, green: 0.298, blue: 0.275, opacity: 1.00)Color(.sRGB, red: 1.000, green: 0.220, blue: 0.235, opacity: 1.00)Color(hex: "#FF383C")#colorLiteral(red: 1.000, green: 0.220, blue: 0.235, alpha: 1.00)Color(uiColor: UIColor(red: 1.000, green: 0.220, blue: 0.235, 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 | #FF383C | #FF4245 | Color(hex: "#FF383C") |
| sRGB (0–255) | rgb(255, 56, 60) | rgb(255, 66, 69) | (r: 1.000, g: 0.220, b: 0.235) |
| Display P3 (Wide Gamut) | P3 (0.922, 0.298, 0.275) | P3 (0.922, 0.325, 0.306) | Color(.displayP3, ...) |
| HSL / HSB | hsl(359, 100%, 61%) | hsl(359, 100%, 63%) | Color(hue:sat:bri:) |
| Platform Bridge | UIKit: UIColor.systemRed | AppKit: NSColor.systemRed | Color(uiColor:) / Color(nsColor:) |
Light Appearance
#FF383Crgb(255, 56, 60)hsl(359, 100%, 61%)(r: 1.000, g: 0.220, b: 0.235)Dark Appearance
#FF4245rgb(255, 66, 69)hsl(359, 100%, 63%)(r: 1.000, g: 0.259, b: 0.271)Drop-In Developer Snippets
Ready-to-paste code blocks for Xcode asset catalogs and Swift files.
Contents.json inside Assets.xcassets/Red.colorset/{
"colors": [
{
"color": {
"color-space": "srgb",
"components": {
"red": "1.000",
"green": "0.220",
"blue": "0.235",
"alpha": "1.000"
}
},
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"color": {
"color-space": "srgb",
"components": {
"red": "1.000",
"green": "0.259",
"blue": "0.271",
"alpha": "1.000"
}
},
"idiom": "universal"
}
],
"info": {
"author": "xcode",
"version": 1
}
}Live UI Component Sandbox
Preview Color.red inside standard Apple interface components.
●SwiftUI Notification
Just nowDemonstrates how Apple designers pair system background tints with dynamic Red accents.
.foregroundStyle(.red)
Platform Implementation Snippets
Ready-to-use Swift code for SwiftUI, UIKit, and AppKit applications.
// Standard SwiftUI Usage
Text("Hello, Apple")
.foregroundStyle(Color.red)
// Background & Shape Fill
RoundedRectangle(cornerRadius: 16)
.fill(Color.red)
.frame(width: 200, height: 50)
// Prominent Action Button
Button("Confirm Action") {
// Action
}
.buttonStyle(.borderedProminent)
.tint(Color.red)WCAG 2.1 Accessibility Contrast Audit
Contrast calculations of Red against pure white and iOS OLED dark surfaces.
Recommended HIG Use Cases
- Destructive buttons (delete, sign out, discard)
- Form validation error messages and alerts
- Notification badges and urgent counters
Anti-Patterns to Avoid
- General non-critical navigation links
- Large unmuted background fills
Browse More SwiftUI Colors
Quickly jump to other Apple system colors and semantic tokens.
Frequently Asked Questions
How do I use Color.red in SwiftUI?
In SwiftUI, apply the color directly using view modifiers like .foregroundStyle(.red), .tint(.red), or .background(.red). You can also instantiate it via Color.red.
What is the HEX code for SwiftUI Red in light and dark mode?
In light appearance, SwiftUI Red resolves to #FF383C. In dark appearance, it automatically adapts to #FF4245.
What is the UIKit and AppKit equivalent of SwiftUI Color.red?
The UIKit equivalent is UIColor.systemRed (accessible in SwiftUI via Color(uiColor: .systemRed)). The AppKit equivalent is NSColor.systemRed (accessible via Color(nsColor: .systemRed)).
Does SwiftUI Color.red adapt automatically to dark mode?
Yes, Color.red is a dynamic Apple system token that automatically updates between light (#FF383C) and dark (#FF4245) appearances when the system appearance changes.
What is the Display P3 and sRGB value of Color.red?
Color.red uses resolved sRGB values (#FF383C in light, #FF4245 in dark) and supports wide color gamut Display P3 coordinates for high-fidelity rendering on Apple Retina displays.