One Logo Pool Ball
UIKit · IOS API REFERENCE

UIColor

class · iOS 2.0+ · SDK 27.1

class UIColor

Members (83)

init · iOS 11.0+

init

TypeScript
static initNamed(name: string): (UIColor) | null
Swift declaration
init?(named name: String)
init · iOS 11.0+

init

TypeScript
static initNamedInCompatibleWith(name: string, bundle?: (_Foundation_Bundle) | null, traitCollection?: (UITraitCollection) | null): (UIColor) | null
Swift declaration
init?(named name: String, in bundle: Bundle?, compatibleWith traitCollection: UITraitCollection?)
get · iOS 2.0+

black

TypeScript
static get black(): UIColor
Swift declaration
class var black: UIColor { get }
get · iOS 2.0+

blue

TypeScript
static get blue(): UIColor
Swift declaration
class var blue: UIColor { get }
get · iOS 2.0+

brown

TypeScript
static get brown(): UIColor
Swift declaration
class var brown: UIColor { get }
get · iOS 2.0+

clear

TypeScript
static get clear(): UIColor
Swift declaration
class var clear: UIColor { get }
get · iOS 2.0+

cyan

TypeScript
static get cyan(): UIColor
Swift declaration
class var cyan: UIColor { get }
get · iOS 2.0+

darkGray

TypeScript
static get darkGray(): UIColor
Swift declaration
class var darkGray: UIColor { get }
get

darkText

TypeScript
static get darkText(): UIColor
Swift declaration
class var darkText: UIColor { get }
get · iOS 2.0+

gray

TypeScript
static get gray(): UIColor
Swift declaration
class var gray: UIColor { get }
get · iOS 2.0+

green

TypeScript
static get green(): UIColor
Swift declaration
class var green: UIColor { get }
get · iOS 2.0+ · Deprecated in iOS 13.0

groupTableViewBackground

TypeScript
static get groupTableViewBackground(): UIColor
Swift declaration
class var groupTableViewBackground: UIColor { get }
get · iOS 13.0+

label

TypeScript
static get label(): UIColor
Swift declaration
class var label: UIColor { get }
get · iOS 2.0+

lightGray

TypeScript
static get lightGray(): UIColor
Swift declaration
class var lightGray: UIColor { get }
get

lightText

TypeScript
static get lightText(): UIColor
Swift declaration
class var lightText: UIColor { get }
get · iOS 13.0+

link

TypeScript
static get link(): UIColor
Swift declaration
class var link: UIColor { get }
get · iOS 2.0+

magenta

TypeScript
static get magenta(): UIColor
Swift declaration
class var magenta: UIColor { get }
get · iOS 13.0+

opaqueSeparator

TypeScript
static get opaqueSeparator(): UIColor
Swift declaration
class var opaqueSeparator: UIColor { get }
get · iOS 2.0+

orange

TypeScript
static get orange(): UIColor
Swift declaration
class var orange: UIColor { get }
get · iOS 13.0+

placeholderText

TypeScript
static get placeholderText(): UIColor
Swift declaration
class var placeholderText: UIColor { get }
get · iOS 2.0+

purple

TypeScript
static get purple(): UIColor
Swift declaration
class var purple: UIColor { get }
get · iOS 13.0+

quaternaryLabel

TypeScript
static get quaternaryLabel(): UIColor
Swift declaration
class var quaternaryLabel: UIColor { get }
get · iOS 13.0+

quaternarySystemFill

TypeScript
static get quaternarySystemFill(): UIColor
Swift declaration
class var quaternarySystemFill: UIColor { get }
get · iOS 2.0+

red

TypeScript
static get red(): UIColor
Swift declaration
class var red: UIColor { get }
get · iOS 13.0+

secondaryLabel

TypeScript
static get secondaryLabel(): UIColor
Swift declaration
class var secondaryLabel: UIColor { get }
get · iOS 13.0+

secondarySystemBackground

TypeScript
static get secondarySystemBackground(): UIColor
Swift declaration
class var secondarySystemBackground: UIColor { get }
get · iOS 13.0+

secondarySystemFill

TypeScript
static get secondarySystemFill(): UIColor
Swift declaration
class var secondarySystemFill: UIColor { get }
get · iOS 13.0+

secondarySystemGroupedBackground

TypeScript
static get secondarySystemGroupedBackground(): UIColor
Swift declaration
class var secondarySystemGroupedBackground: UIColor { get }
get · iOS 13.0+

separator

TypeScript
static get separator(): UIColor
Swift declaration
class var separator: UIColor { get }
get · iOS 13.0+

systemBackground

TypeScript
static get systemBackground(): UIColor
Swift declaration
class var systemBackground: UIColor { get }
get · iOS 7.0+

systemBlue

TypeScript
static get systemBlue(): UIColor
Swift declaration
class var systemBlue: UIColor { get }
get · iOS 13.0+

systemBrown

TypeScript
static get systemBrown(): UIColor
Swift declaration
class var systemBrown: UIColor { get }
get · iOS 15.0+

systemCyan

TypeScript
static get systemCyan(): UIColor
Swift declaration
class var systemCyan: UIColor { get }
get · iOS 13.0+

systemFill

TypeScript
static get systemFill(): UIColor
Swift declaration
class var systemFill: UIColor { get }
get · iOS 13.0+

systemGray2

TypeScript
static get systemGray2(): UIColor
Swift declaration
class var systemGray2: UIColor { get }
get · iOS 13.0+

systemGray3

TypeScript
static get systemGray3(): UIColor
Swift declaration
class var systemGray3: UIColor { get }
get · iOS 13.0+

systemGray4

TypeScript
static get systemGray4(): UIColor
Swift declaration
class var systemGray4: UIColor { get }
get · iOS 13.0+

systemGray5

TypeScript
static get systemGray5(): UIColor
Swift declaration
class var systemGray5: UIColor { get }
get · iOS 13.0+

systemGray6

TypeScript
static get systemGray6(): UIColor
Swift declaration
class var systemGray6: UIColor { get }
get · iOS 7.0+

systemGray

TypeScript
static get systemGray(): UIColor
Swift declaration
class var systemGray: UIColor { get }
get · iOS 7.0+

systemGreen

TypeScript
static get systemGreen(): UIColor
Swift declaration
class var systemGreen: UIColor { get }
get · iOS 13.0+

systemGroupedBackground

TypeScript
static get systemGroupedBackground(): UIColor
Swift declaration
class var systemGroupedBackground: UIColor { get }
get · iOS 13.0+

systemIndigo

TypeScript
static get systemIndigo(): UIColor
Swift declaration
class var systemIndigo: UIColor { get }
get · iOS 15.0+

systemMint

TypeScript
static get systemMint(): UIColor
Swift declaration
class var systemMint: UIColor { get }
get · iOS 7.0+

systemOrange

TypeScript
static get systemOrange(): UIColor
Swift declaration
class var systemOrange: UIColor { get }
get · iOS 7.0+

systemPink

TypeScript
static get systemPink(): UIColor
Swift declaration
class var systemPink: UIColor { get }
get · iOS 9.0+

systemPurple

TypeScript
static get systemPurple(): UIColor
Swift declaration
class var systemPurple: UIColor { get }
get · iOS 7.0+

systemRed

TypeScript
static get systemRed(): UIColor
Swift declaration
class var systemRed: UIColor { get }
get · iOS 7.0+

systemTeal

TypeScript
static get systemTeal(): UIColor
Swift declaration
class var systemTeal: UIColor { get }
get · iOS 7.0+

systemYellow

TypeScript
static get systemYellow(): UIColor
Swift declaration
class var systemYellow: UIColor { get }
get · iOS 13.0+

tertiaryLabel

TypeScript
static get tertiaryLabel(): UIColor
Swift declaration
class var tertiaryLabel: UIColor { get }
get · iOS 13.0+

tertiarySystemBackground

TypeScript
static get tertiarySystemBackground(): UIColor
Swift declaration
class var tertiarySystemBackground: UIColor { get }
get · iOS 13.0+

tertiarySystemFill

TypeScript
static get tertiarySystemFill(): UIColor
Swift declaration
class var tertiarySystemFill: UIColor { get }
get · iOS 13.0+

tertiarySystemGroupedBackground

TypeScript
static get tertiarySystemGroupedBackground(): UIColor
Swift declaration
class var tertiarySystemGroupedBackground: UIColor { get }
get · iOS 15.0+

tintColor

TypeScript
static get tintColor(): UIColor
Swift declaration
class var tintColor: UIColor { get }
get · iOS 2.0+

white

TypeScript
static get white(): UIColor
Swift declaration
class var white: UIColor { get }
get · iOS 2.0+

yellow

TypeScript
static get yellow(): UIColor
Swift declaration
class var yellow: UIColor { get }
method · iOS 26.0+

applyingContentHeadroom

TypeScript
applyingContentHeadroom(contentHeadroom: number): UIColor
Swift declaration
func applyingContentHeadroom(_ contentHeadroom: CGFloat) -> UIColor
method · iOS 2.0+

withAlphaComponent

TypeScript
withAlphaComponent(alpha: number): UIColor
Swift declaration
func withAlphaComponent(_ alpha: CGFloat) -> UIColor
method · iOS 18.0+

withProminence

TypeScript
withProminence(prominence: UIColor_Prominence): UIColor
Swift declaration
func withProminence(_ prominence: UIColor.Prominence) -> UIColor
method · iOS 5.0+

getHue

TypeScript
getHue(hue?: ("animatableData" | SDKHandle) | null, saturation?: ("animatableData" | SDKHandle) | null, brightness?: ("animatableData" | SDKHandle) | null, alpha?: ("animatableData" | SDKHandle) | null): boolean
Swift declaration
func getHue(_ hue: UnsafeMutablePointer<CGFloat>?, saturation: UnsafeMutablePointer<CGFloat>?, brightness: UnsafeMutablePointer<CGFloat>?, alpha: UnsafeMutablePointer<CGFloat>?) -> Bool
method · iOS 5.0+

getRed

TypeScript
getRed(red?: ("animatableData" | SDKHandle) | null, green?: ("animatableData" | SDKHandle) | null, blue?: ("animatableData" | SDKHandle) | null, alpha?: ("animatableData" | SDKHandle) | null): boolean
Swift declaration
func getRed(_ red: UnsafeMutablePointer<CGFloat>?, green: UnsafeMutablePointer<CGFloat>?, blue: UnsafeMutablePointer<CGFloat>?, alpha: UnsafeMutablePointer<CGFloat>?) -> Bool
method · iOS 5.0+

getWhite

TypeScript
getWhite(white?: ("animatableData" | SDKHandle) | null, alpha?: ("animatableData" | SDKHandle) | null): boolean
Swift declaration
func getWhite(_ white: UnsafeMutablePointer<CGFloat>?, alpha: UnsafeMutablePointer<CGFloat>?) -> Bool
init · iOS 2.0+

init

TypeScript
static initCgColor(cgColor: _CoreGraphics_CGColor): UIColor
Swift declaration
init(cgColor: CGColor)
init · iOS 5.0+

init

TypeScript
static initCiColor(ciColor: _CoreImage_CIColor): UIColor
Swift declaration
init(ciColor: CIColor)
init · iOS 10.0+

init

TypeScript
static initDisplayP3RedGreenBlueAlpha(displayP3Red: number, green: number, blue: number, alpha: number): UIColor
Swift declaration
init(displayP3Red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat)
init · iOS 2.0+

init

TypeScript
static initHueSaturationBrightnessAlpha(hue: number, saturation: number, brightness: number, alpha: number): UIColor
Swift declaration
init(hue: CGFloat, saturation: CGFloat, brightness: CGFloat, alpha: CGFloat)
init · iOS 2.0+

init

TypeScript
static initPatternImage(image: UIImage): UIColor
Swift declaration
init(patternImage image: UIImage)
init · iOS 2.0+

init

TypeScript
static initRedGreenBlueAlpha(red: number, green: number, blue: number, alpha: number): UIColor
Swift declaration
init(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat)
init · iOS 26.0+

init

TypeScript
static initRedGreenBlueAlphaExposure(red: number, green: number, blue: number, alpha: number, exposure: number): UIColor
Swift declaration
init(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat, exposure: CGFloat)
init · iOS 26.0+

init

TypeScript
static initRedGreenBlueAlphaLinearExposure(red: number, green: number, blue: number, alpha: number, linearExposure: number): UIColor
Swift declaration
init(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat, linearExposure: CGFloat)
init · iOS 2.0+

init

TypeScript
static initWhiteAlpha(white: number, alpha: number): UIColor
Swift declaration
init(white: CGFloat, alpha: CGFloat)
method · iOS 13.0+

resolvedColor

TypeScript
resolvedColor(traitCollection: UITraitCollection): UIColor
Swift declaration
func resolvedColor(with traitCollection: UITraitCollection) -> UIColor
method · iOS 2.0+

set

TypeScript
set(): void
Swift declaration
func set()
method · iOS 2.0+

setFill

TypeScript
setFill(): void
Swift declaration
func setFill()
method · iOS 2.0+

setStroke

TypeScript
setStroke(): void
Swift declaration
func setStroke()
get · iOS 2.0+

cgColor

TypeScript
get cgColor(): _CoreGraphics_CGColor
Swift declaration
var cgColor: CGColor { get }
get · iOS 5.0+

ciColor

TypeScript
get ciColor(): _CoreImage_CIColor
Swift declaration
var ciColor: CIColor { get }
get · iOS 14.0+

accessibilityName

TypeScript
get accessibilityName(): string
Swift declaration
var accessibilityName: String { get }
get · iOS 26.0+

linearExposure

TypeScript
get linearExposure(): number
Swift declaration
var linearExposure: CGFloat { get }
get · iOS 18.0+

prominence

TypeScript
get prominence(): UIColor_Prominence
Swift declaration
var prominence: UIColor.Prominence { get }
get · iOS 26.0+

standardDynamicRange

TypeScript
get standardDynamicRange(): UIColor
Swift declaration
@NSCopying var standardDynamicRange: UIColor { get }
init · iOS 17.0+

init

TypeScript
static initResource(resource: _DeveloperToolsSupport_ColorResource): UIColor
Swift declaration
convenience init(resource: ColorResource)

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

UIColor.init(dynamicProvider:)

callback cannot propagate synchronous failure

UIColor.init()

inherited init: cannot prove legal (class declares 18 custom initializers)

All UIKit types →