SwiftUI Color.green

.green
Success, Confirmations & Health
Adaptive System Token•iOS 13.0+, macOS 10.15+, tvOS 13.0+, watchOS 6.0+, visionOS 1.0+

Complete technical specification and developer reference for Green in Apple's SwiftUI design system. In light appearance, it resolves to HEX #34C759; in dark appearance, it dynamically adapts to HEX #30D158. Features wide-gamut Display P3 values, UIKit bridge (UIColor.systemGreen), AppKit bridge (NSColor.systemGreen), WCAG contrast audit, and Xcode drop-in initializers.

Light Mode#34C759
Dark Mode#30D158
Green Color Preview

SwiftUI's adaptable green.

Color.green
Copy:
Dynamic Asset
Success, Confirmations & Health
iOS 13.0+, macOS 10.15+, tvOS 13.0+, watchOS 6.0+, visionOS 1.0+
Initializers & Color Spaces
Color(r:g:b:)Color(red: 0.204, green: 0.780, blue: 0.349)
Color(r:g:b:op:)Color(red: 0.204, green: 0.780, blue: 0.349, opacity: 1.00)
Color(hue:sat:bri:)HSBColor(hue: 0.375, saturation: 0.739, brightness: 0.780, opacity: 1.00)
Color(.displayP3)Wide GamutColor(.displayP3, red: 0.396, green: 0.769, blue: 0.400, opacity: 1.00)
Color(.sRGB)Color(.sRGB, red: 0.204, green: 0.780, blue: 0.349, opacity: 1.00)
Color(hex:)ExtensionColor(hex: "#34C759")
#colorLiteralXcode#colorLiteral(red: 0.204, green: 0.780, blue: 0.349, alpha: 1.00)
Color(uiColor:)iOSColor(uiColor: UIColor(red: 0.204, green: 0.780, blue: 0.349, alpha: 1.00))
Active HEX: #34C759P3 R: 0.396 G: 0.769 B: 0.400

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 / SpaceLight AppearanceDark AppearanceSwift Code Literal
HEX Code#34C759#30D158Color(hex: "#34C759")
sRGB (0–255)rgb(52, 199, 89)rgb(48, 209, 88)(r: 0.204, g: 0.780, b: 0.349)
Display P3 (Wide Gamut)P3 (0.396, 0.769, 0.400)P3 (0.408, 0.808, 0.404)Color(.displayP3, ...)
HSL / HSBhsl(135, 59%, 49%)hsl(135, 64%, 50%)Color(hue:sat:bri:)
Platform BridgeUIKit: UIColor.systemGreenAppKit: NSColor.systemGreenColor(uiColor:) / Color(nsColor:)

Light Appearance

Light Theme
HEX Code
#34C759
RGB (0–255)
rgb(52, 199, 89)
HSL
hsl(135, 59%, 49%)
Normalized Swift Literal:
(r: 0.204, g: 0.780, b: 0.349)

Dark Appearance

Dark Theme
HEX Code
#30D158
RGB (0–255)
rgb(48, 209, 88)
HSL
hsl(135, 64%, 50%)
Normalized Swift Literal:
(r: 0.188, g: 0.820, b: 0.345)

Drop-In Developer Snippets

Ready-to-paste code blocks for Xcode asset catalogs and Swift files.

Xcode Location: Save as Contents.json inside Assets.xcassets/Green.colorset/
Includes Light + Dark Modes
Contents.json
{
  "colors": [
    {
      "color": {
        "color-space": "srgb",
        "components": {
          "red": "0.204",
          "green": "0.780",
          "blue": "0.349",
          "alpha": "1.000"
        }
      },
      "idiom": "universal"
    },
    {
      "appearances": [
        {
          "appearance": "luminosity",
          "value": "dark"
        }
      ],
      "color": {
        "color-space": "srgb",
        "components": {
          "red": "0.188",
          "green": "0.820",
          "blue": "0.345",
          "alpha": "1.000"
        }
      },
      "idiom": "universal"
    }
  ],
  "info": {
    "author": "xcode",
    "version": 1
  }
}

Live UI Component Sandbox

Preview Color.green inside standard Apple interface components.

Interactive Controls
Active TagBadge 99+
Toggle Tint
Container & Typography Styling

●SwiftUI Notification

Just now

Demonstrates how Apple designers pair system background tints with dynamic Green accents.

Dynamic Headline in Green

.foregroundStyle(.green)

Platform Implementation Snippets

Ready-to-use Swift code for SwiftUI, UIKit, and AppKit applications.

SwiftUI (Swift 5.9+)
// Standard SwiftUI Usage
Text("Hello, Apple")
    .foregroundStyle(Color.green)

// Background & Shape Fill
RoundedRectangle(cornerRadius: 16)
    .fill(Color.green)
    .frame(width: 200, height: 50)

// Prominent Action Button
Button("Confirm Action") {
    // Action
}
.buttonStyle(.borderedProminent)
.tint(Color.green)

WCAG 2.1 Accessibility Contrast Audit

Contrast calculations of Green against pure white and iOS OLED dark surfaces.

Light Mode (#34C759)on White (#FFF)
Contrast Ratio:2.22:1
Normal Text (4.5:1 AA): Fail
Dark Mode (#30D158)on Dark (#1C1C1E)
Contrast Ratio:8.42:1
Normal Text (4.5:1 AA): Pass (AA)

Recommended HIG Use Cases

  • Success feedback, confirmations, and completed tasks
  • Positive financial gains and statistics
  • Fitness tracking rings and active status indicators

Anti-Patterns to Avoid

  • Critical error alerts
  • Sole indicator of state without supporting iconography

Browse More SwiftUI Colors

Quickly jump to other Apple system colors and semantic tokens.

All 18 Colors →

Frequently Asked Questions

How do I use Color.green in SwiftUI?

In SwiftUI, apply the color directly using view modifiers like .foregroundStyle(.green), .tint(.green), or .background(.green). You can also instantiate it via Color.green.

What is the HEX code for SwiftUI Green in light and dark mode?

In light appearance, SwiftUI Green resolves to #34C759. In dark appearance, it automatically adapts to #30D158.

What is the UIKit and AppKit equivalent of SwiftUI Color.green?

The UIKit equivalent is UIColor.systemGreen (accessible in SwiftUI via Color(uiColor: .systemGreen)). The AppKit equivalent is NSColor.systemGreen (accessible via Color(nsColor: .systemGreen)).

Does SwiftUI Color.green adapt automatically to dark mode?

Yes, Color.green is a dynamic Apple system token that automatically updates between light (#34C759) and dark (#30D158) appearances when the system appearance changes.

What is the Display P3 and sRGB value of Color.green?

Color.green uses resolved sRGB values (#34C759 in light, #30D158 in dark) and supports wide color gamut Display P3 coordinates for high-fidelity rendering on Apple Retina displays.