---
title: DataDetector.Match.HighlightStyle
framework: datadetection
role: symbol
role_heading: Enumeration
path: datadetection/datadetector/match/highlightstyle
---

# DataDetector.Match.HighlightStyle

Values that suggest how to style a highlighted item.

## Declaration

```swift
enum HighlightStyle
```

## Discussion

Discussion When visually highlighting a match in some text, HighlightStyle suggests how to style a highlight. A highlight style of 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 indicates that the match looks like a regular web link, such as a link using the .link color. A 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  as the default.

## Topics

### Enumeration Cases

- [DataDetector.Match.HighlightStyle.hidden](datadetection/datadetector/match/highlightstyle/hidden.md)
- [DataDetector.Match.HighlightStyle.regular](datadetection/datadetector/match/highlightstyle/regular.md)
- [DataDetector.Match.HighlightStyle.url](datadetection/datadetector/match/highlightstyle/url.md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [Decodable](swift/decodable.md)
- [Encodable](swift/encodable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Values that describe highlighting and semantic details of matches

- [DataDetector.Match.SemanticDetails](datadetection/datadetector/match/semanticdetails.md)
