<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIButton/titleColor(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIButton(im)titleColorForState:"
  },
  "title" : "titleColor(for:)"
}
-->

# titleColor(for:)

Returns the title color used for a state.

```
func titleColor(for state: UIControl.State) -> UIColor?
```

## Parameters

`state`

The state that uses the title color. The possible values are described in [`UIControl.State`](/documentation/UIKit/UIControl/State-swift.struct).

## Return Value

The color of the title for the specified state.

## Discussion

---

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)