---
title: NSAttributedString.TextHighlightColorScheme
framework: foundation
role: symbol
role_heading: Structure
path: foundation/nsattributedstring/texthighlightcolorscheme
---

# NSAttributedString.TextHighlightColorScheme

Constants that specify the highlight color to use with the text.

## Declaration

```swift
struct TextHighlightColorScheme
```

## Overview

Overview Use an NSAttributedString.TextHighlightColorScheme structure as the value of the textHighlightColorScheme attribute. That attribute specifies which color to use when drawing the highlight on the text. This attribute specifies only the color option. To display the highlight itself, add the textHighlightStyle attribute to the text.

## Topics

### Getting the color schemes

- [default](foundation/nsattributedstring/texthighlightcolorscheme/default.md)
- [blue](foundation/nsattributedstring/texthighlightcolorscheme/blue.md)
- [mint](foundation/nsattributedstring/texthighlightcolorscheme/mint.md)
- [orange](foundation/nsattributedstring/texthighlightcolorscheme/orange.md)
- [pink](foundation/nsattributedstring/texthighlightcolorscheme/pink.md)
- [purple](foundation/nsattributedstring/texthighlightcolorscheme/purple.md)

### Creating a color scheme

- [init(_:)](foundation/nsattributedstring/texthighlightcolorscheme/init(_:).md)
- [init(rawValue:)](foundation/nsattributedstring/texthighlightcolorscheme/init(rawvalue:).md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Getting text content attributes

- [NSAttributedString.Key](foundation/nsattributedstring/key.md)
- [NSAttributedString.TextHighlightStyle](foundation/nsattributedstring/texthighlightstyle.md)
- [NSAttributedString.TextEffectStyle](foundation/nsattributedstring/texteffectstyle.md)
- [NSAttributedString.SpellingState](foundation/nsattributedstring/spellingstate.md)
- [NSUnderlineStyle](uikit/nsunderlinestyle.md)
- [NSWritingDirectionFormatType](uikit/nswritingdirectionformattype.md)
