<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DataDetection",
  "identifier" : "/documentation/DataDetection/DataDetector/Match/HighlightStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "DataDetection"
    ],
    "preciseIdentifier" : "s:13DataDetection0A8DetectorO5MatchV14HighlightStyleO"
  },
  "title" : "DataDetector.Match.HighlightStyle"
}
-->

# DataDetector.Match.HighlightStyle

Values that suggest how to style a highlighted item.

```
enum HighlightStyle
```

## Discussion

When visually highlighting a match in some text, `HighlightStyle` suggests how to style a highlight.

- A highlight style of [`DataDetector.Match.HighlightStyle.hidden`](/documentation/DataDetection/DataDetector/Match/HighlightStyle/hidden) indicates that the match isn’t displayed. You can, however, use the match to better interpret surrounding results.
- A highlight style of [`DataDetector.Match.HighlightStyle.url`](/documentation/DataDetection/DataDetector/Match/HighlightStyle/url) indicates that the match looks like a regular web link, such as a link using the `.link` color.
- A [`DataDetector.Match.HighlightStyle.regular`](/documentation/DataDetection/DataDetector/Match/HighlightStyle/regular) highlight style indicates that the match is highlighted in a nonintrusive manner.

For instance, in iOS, the system typically displays these matches with an underline using a dimmed version of the original text color. As a suggestion for the dimmed color, when the original color is white (saturation is less than `0.02` and brightness is above `0.98`), apply an alpha value of  `0.46` to the original color. Otherwise, use a `0.26` alpha value.

Treat [`DataDetector.Match.HighlightStyle.regular`](/documentation/DataDetection/DataDetector/Match/HighlightStyle/regular)  as the default.

## Topics

### Enumeration Cases

[`case hidden`](/documentation/DataDetection/DataDetector/Match/HighlightStyle/hidden)

A highlight style that indicates the match is visually hidden from the display.

[`case regular`](/documentation/DataDetection/DataDetector/Match/HighlightStyle/regular)

A highlight style that indicates the match is accentuated in a nonintrusive manner.

[`case url`](/documentation/DataDetection/DataDetector/Match/HighlightStyle/url)

A highlight style that indicates the match displays like a regular web link.

## Relationships

### Conforms To

[`Decodable`](/documentation/Swift/Decodable)

[`Hashable`](/documentation/Swift/Hashable)

[`Encodable`](/documentation/Swift/Encodable)

[`Sendable`](/documentation/Swift/Sendable)

[`Copyable`](/documentation/Swift/Copyable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Escapable`](/documentation/Swift/Escapable)

---

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)