Skip to content

Color(UIColor.systemBackground) #278

@dfabulich

Description

@dfabulich

https://developer.apple.com/documentation/uikit/uicolor/systembackground

In SwiftUI, you can use UIColor.systemBackground with Color(.systemBackground), but that doesn't work in SkipUI, where UIColor is just a basic data model with no built-in static colors.

// Copyright 2023–2025 Skip
// SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
#if !SKIP_BRIDGE
#if !SKIP
import struct CoreGraphics.CGFloat
#endif
// SKIP @bridge
public final class UIColor {
let red: CGFloat
let green: CGFloat
let blue: CGFloat
let alpha: CGFloat
// SKIP @bridge
public init(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat) {
self.red = red
self.green = green
self.blue = blue
self.alpha = alpha
}
}
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    appearanceInconsistencies between the expected appearance of components in Jetpack Compose vs. SwiftUIgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions