<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSAttributedString/TextHighlightColorScheme",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@T@NSTextHighlightColorScheme"
  },
  "title" : "NSAttributedString.TextHighlightColorScheme"
}
-->

# NSAttributedString.TextHighlightColorScheme

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

```
struct TextHighlightColorScheme
```

## Overview

Use an [`NSAttributedString.TextHighlightColorScheme`](/documentation/Foundation/NSAttributedString/TextHighlightColorScheme) structure as the value of the [`textHighlightColorScheme`](/documentation/Foundation/NSAttributedString/Key/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`](/documentation/Foundation/NSAttributedString/Key/textHighlightStyle) attribute to the text.

## Topics

### Getting the color schemes

[`static let `default`: NSAttributedString.TextHighlightColorScheme`](/documentation/Foundation/NSAttributedString/TextHighlightColorScheme/default)

The default system highlight color.

[`static let blue: NSAttributedString.TextHighlightColorScheme`](/documentation/Foundation/NSAttributedString/TextHighlightColorScheme/blue)

A blue highlight color.

[`static let mint: NSAttributedString.TextHighlightColorScheme`](/documentation/Foundation/NSAttributedString/TextHighlightColorScheme/mint)

A mint green highlight color.

[`static let orange: NSAttributedString.TextHighlightColorScheme`](/documentation/Foundation/NSAttributedString/TextHighlightColorScheme/orange)

An orange highlight color.

[`static let pink: NSAttributedString.TextHighlightColorScheme`](/documentation/Foundation/NSAttributedString/TextHighlightColorScheme/pink)

A pink highlight color.

[`static let purple: NSAttributedString.TextHighlightColorScheme`](/documentation/Foundation/NSAttributedString/TextHighlightColorScheme/purple)

A purple highlight color.

### Creating a color scheme

[`init(String)`](/documentation/Foundation/NSAttributedString/TextHighlightColorScheme/init(_:))

[`init(rawValue: String)`](/documentation/Foundation/NSAttributedString/TextHighlightColorScheme/init(rawValue:))

## Relationships

### Conforms To

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

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

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

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

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

---

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)