<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIColor/withProminence(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIColor(im)colorWithProminence:"
  },
  "title" : "withProminence(_:)"
}
-->

# withProminence(_:)

Returns the version of the current color that results from applying the specified prominence.

```
func withProminence(_ prominence: UIColor.Prominence) -> UIColor
```

## Parameters

`prominence`

The prominence to apply to the color. For options, see [`UIColor.Prominence`](/documentation/UIKit/UIColor/Prominence-swift.enum).

## Return Value

The version of the color to display for the specified prominence.

## Discussion

Interface elements, such as text labels, can have a different level of prominence in the UI. For example, a title label appears more prominently than a subtitle or caption. When you specify a label’s color, you can pass one of the [`UIColor.Prominence`](/documentation/UIKit/UIColor/Prominence-swift.enum) constants to [`withProminence(_:)`](/documentation/UIKit/UIColor/withProminence(_:)) to communicate how prominently to display that color in the UI.

The following code creates a label with a secondary, vibrant red color:

```swift
let label = UILabel()
label.preferredVibrancy = .automatic
label.textColor = .systemRed.withProminence(.secondary) 
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)