---
title: NSTextHighlightStyle
framework: appkit
role: symbol
role_heading: Type Alias
path: appkit/nstexthighlightstyle
---

# NSTextHighlightStyle

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

## Declaration

```occ
typedef NSString * NSTextHighlightStyle;
```

## Discussion

Discussion Use an NSTextHighlightStyle structure as the value of the 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

- [NSTextHighlightStyleDefault](appkit/nstexthighlightstyledefault.md)

## See Also

### Getting text content attributes

- [TextKit string attribute keys](appkit/textkit-string-attribute-keys.md)
- [NSTextHighlightColorScheme](appkit/nstexthighlightcolorscheme.md)
- [NSTextEffectStyle](appkit/nstexteffectstyle.md)
- [NSSpellingState](appkit/nsspellingstate.md)
- [NSUnderlineStyle](appkit/nsunderlinestyle.md)
- [NSWritingDirectionFormatType](appkit/nswritingdirectionformattype.md)
