<!--
{
  "availability" : [
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextHighlightStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSTextHighlightStyle"
  },
  "title" : "NSTextHighlightStyle"
}
-->

# NSTextHighlightStyle

Constants that specify the type of highlight to apply to text.

```
typedef NSString * NSTextHighlightStyle;
```

## Discussion

Use an [`NSTextHighlightStyle`](/documentation/AppKit/NSTextHighlightStyle) structure as the value of the [`NSTextHighlightStyleAttributeName`](/documentation/AppKit/NSTextHighlightStyleAttributeName) attribute. That attribute applies a highlight to the text to emphasize it. The highlight contributes a background color and a contrasting foreground color to the text.

## Topics

### Getting the highlight styles

[`extern NSTextHighlightStyle const NSTextHighlightStyleDefault;`](/documentation/AppKit/NSTextHighlightStyleDefault)

The default highlight style to apply to text.



---

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)