iOS Dark Text
UIColor.darkTextComplete technical specification and developer reference for Dark Text in Apple's iOS & iPadOS design system. In light appearance, it resolves to HEX #000000; in dark appearance, it dynamically adapts to HEX #000000. Features wide-gamut Display P3 values, UIKit bridge (UIColor.darkText), AppKit bridge (NSColor.darkText), WCAG contrast audit, and Xcode drop-in initializers.
A legacy dark text color.
ColorUIColor.darkTextColor(red: 0.000, green: 0.000, blue: 0.000)Color(red: 0.000, green: 0.000, blue: 0.000, opacity: 1.00)Color(hue: 0.000, saturation: 0.000, brightness: 0.000, opacity: 1.00)Color(.displayP3, red: 0.000, green: 0.000, blue: 0.000, opacity: 1.00)Color(.sRGB, red: 0.000, green: 0.000, blue: 0.000, opacity: 1.00)Color(hex: "#000000")#colorLiteral(red: 0.000, green: 0.000, blue: 0.000, alpha: 1.00)Color(uiColor: UIColor(red: 0.000, green: 0.000, blue: 0.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 | #000000 | #000000 | Color(hex: "#000000") |
| sRGB (0–255) | rgb(0, 0, 0) | rgb(0, 0, 0) | (r: 0.000, g: 0.000, b: 0.000) |
| Display P3 (Wide Gamut) | P3 (0.000, 0.000, 0.000) | P3 (0.000, 0.000, 0.000) | Color(.displayP3, ...) |
| HSL / HSB | hsl(0, 0%, 0%) | hsl(0, 0%, 0%) | Color(hue:sat:bri:) |
| Platform Bridge | UIKit: UIColor.darkText | AppKit: NSColor.darkText | Color(uiColor:) / Color(nsColor:) |
Light Appearance
#000000rgb(0, 0, 0)hsl(0, 0%, 0%)(r: 0.000, g: 0.000, b: 0.000)Dark Appearance
#000000rgb(0, 0, 0)hsl(0, 0%, 0%)(r: 0.000, g: 0.000, b: 0.000)Drop-In Developer Snippets
Ready-to-paste code blocks for Xcode asset catalogs and Swift files.
Contents.json inside Assets.xcassets/Dark Text.colorset/{
"colors": [
{
"color": {
"color-space": "srgb",
"components": {
"red": "0.000",
"green": "0.000",
"blue": "0.000",
"alpha": "1.000"
}
},
"idiom": "universal"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"color": {
"color-space": "srgb",
"components": {
"red": "0.000",
"green": "0.000",
"blue": "0.000",
"alpha": "1.000"
}
},
"idiom": "universal"
}
],
"info": {
"author": "xcode",
"version": 1
}
}Live UI Component Sandbox
Preview Color.dark text inside standard Apple interface components.
●SwiftUI Notification
Just nowDemonstrates how Apple designers pair system background tints with dynamic Dark Text accents.
.foregroundStyle(UIColor.darkText)
Platform Implementation Snippets
Ready-to-use Swift code for SwiftUI, UIKit, and AppKit applications.
// UIKit (iOS, tvOS, watchOS)
let view = UIView()
view.backgroundColor = UIColor.darkText
// Label Tinting
let label = UILabel()
label.textColor = UIColor.darkText
// Bridging UIKit into SwiftUI
let swiftUIColor = Color(uiColor: .darkText)WCAG 2.1 Accessibility Contrast Audit
Contrast calculations of Dark Text against pure white and iOS OLED dark surfaces.
Recommended HIG Use Cases
- Standard UIKit interfaces
- Adaptive trait-aware views
- iOS HIG compliance
Anti-Patterns to Avoid
- Hardcoded static hex values when dynamic adaptation is needed
Browse More iOS & iPadOS Colors
Quickly jump to other Apple system colors and semantic tokens.
Frequently Asked Questions
How do I use UIColor.darkText in iOS and iPadOS apps?
In UIKit, assign UIColor.darkText directly to properties like view.backgroundColor, label.textColor, or tintColor. In SwiftUI, bridge it using Color(uiColor: .darkText).
What is the HEX code for iOS Dark Text in light and dark mode?
In light appearance, Dark Text resolves to #000000. In dark appearance, it automatically adapts to #000000.
How do I bridge UIColor.darkText into SwiftUI?
In SwiftUI views on iOS 15+, initialize Color(uiColor: .darkText) to utilize this system color with full appearance dynamism.
Does Dark Text adapt automatically to dark appearance in iOS?
Yes, UIColor.darkText is an appearance-aware dynamic UIColor that automatically responds to UITraitCollection changes between light and dark appearances.
Why use UIKit system colors instead of hardcoded hex values?
System colors dynamically adapt to Dark Mode, Accessibility Increase Contrast mode, and future iOS visual refinements without manual color bookkeeping.