---
title: "withProminence(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uicolor/withprominence(_:)"
---

# withProminence(_:)

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

## Declaration

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

## Parameters

- `prominence`: The prominence to apply to the color. For options, see doc://com.apple.uikit/documentation/UIKit/UIColor/Prominence-swift.enum.

## Return Value

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

## Discussion

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 constants to withProminence(_:) to communicate how prominently to display that color in the UI. The following code creates a label with a secondary, vibrant red color: let label = UILabel() label.preferredVibrancy = .automatic label.textColor = .systemRed.withProminence(.secondary)

## See Also

### Working with color prominence

- [prominence](uikit/uicolor/prominence-swift.property.md)
- [UIColor.Prominence](uikit/uicolor/prominence-swift.enum.md)
