> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/ios/annotation/customize-color-picker.md).

# Customize annotation style presets on iOS

Learn how to customize annotation presets in your app with this comprehensive guide. Find out how to set initial values for color, text size, thickness, and more using a custom plist file. The Apryse

## Overview

Annotation tools come with a set of four presets, accessible from the presets section:

![](https://4149080208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgY6xtY9ZQd9XMpvWlGM0%2Fuploads%2Fgit-blob-52a228a5e402f7e7a74739f7c0b6ed5bedf854f4%2Fe64230a373c1fc58e8b26ab0e06ddbd01c0051a0-1668x1085.jpg?alt=media)

Annotation tools can also be invoked via a long-press.

These presets are "sticky" in that changes made by the user to each preset will persist between runs of your app.

This guide explains how to customize the initial values of the presets.

## Customizing Presets

Presets are customized using a custom [plist](https://developer.apple.com/library/archive/General/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html) (property list) that **must** be called `PTAnnotationStyleDefaults.plist` file included in your app's bundle. This can be done by including the file in your Xcode project and ensuring that it is copied into the app bundle as shown:

![](https://4149080208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgY6xtY9ZQd9XMpvWlGM0%2Fuploads%2Fgit-blob-14bdf6efc27d9ce228430b232375e373fda8182e%2F66602e0484b3564b82f03cdefda479d688715366-2756x1600.jpg?alt=media)

The plist contains an array of dictionaries. Each dictionary has two entries, one with the key `types` and the other with the key `presets`.

The value of the `types` entry is an array of strings, where each string value is the name of the annotation type for which the associated presets apply.

The value of the `presets` entry is an array of exactly four dictionaries, where each dictionary represents one preset. The dictionaries contain key/value pairs, where the key is the annotation property, and the value is its initial value.

This is an example .plist file, shown in Xcode's plist editor, and written as xml. A list of all possible keys follows the example. You can also download the example [plist file](https://pdftron.s3.amazonaws.com/custom/websitefiles/ios/PTAnnotationStyleDefaults.plist).

![](https://4149080208-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgY6xtY9ZQd9XMpvWlGM0%2Fuploads%2Fgit-blob-43e2e02a588d1985c1fe8f6ffe0e0dfdbae744c0%2F5d5ed08c958eee55270a8816130934a9e930871c-1044x754.png?alt=media)

{% tabs %}
{% tab title="XML" %}
{% code lineNumbers="true" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
	<dict>
		<key>types</key>
		<array>
			<string>Ink</string>
		</array>
		<key>presets</key>
		<array>
			<dict>
				<key>thickness</key>
				<integer>2</integer>
				<key>color</key>
				<string>#00ff00</string>
			</dict>
			<dict>
				<key>thickness</key>
				<integer>4</integer>
				<key>color</key>
				<string>#00ff00</string>
			</dict>
			<dict>
				<key>thickness</key>
				<integer>8</integer>
				<key>color</key>
				<string>#ff0000</string>
			</dict>
			<dict>
				<key>thickness</key>
				<integer>16</integer>
				<key>color</key>
				<string>#ff0000</string>
			</dict>
		</array>
	</dict>
	<dict>
		<key>types</key>
		<array>
			<string>Highlight</string>
		</array>
		<key>presets</key>
		<array>
			<dict>
				<key>color</key>
				<string>#123456</string>
				<key>opacity</key>
				<real>0.3</real>
			</dict>
			<dict>
				<key>color</key>
				<string>#00ff00</string>
			</dict>
			<dict>
				<key>color</key>
				<string>#00ffff</string>
			</dict>
			<dict>
				<key>color</key>
				<string>#ff00ff</string>
			</dict>
		</array>
	</dict>
	<dict>
		<key>types</key>
		<array>
			<string>Underline</string>
			<string>Squiggly</string>
			<string>StrikeOut</string>
		</array>
		<key>presets</key>
		<array>
			<dict>
				<key>color</key>
				<string>#111111</string>
			</dict>
			<dict>
				<key>color</key>
				<string>#00cc63</string>
			</dict>
			<dict>
				<key>color</key>
				<string>#4e7de9</string>
			</dict>
			<dict>
				<key>color</key>
				<string>#000000</string>
			</dict>
		</array>
	</dict>
</array>
</plist>
```

{% endcode %}
{% endtab %}
{% endtabs %}

| `presets` key | value                                       | property                                                                                                     |
| ------------- | ------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `color`       | hex-formatted RRGGBB string, e.g. `#ff0000` | The color or stroke color of the annotation.                                                                 |
| `fillColor`   | hex-formatted RRGGBB string, e.g. `#00ff00` | The fill color of the annotation.                                                                            |
| `textColor`   | hex-formatted RRGGBB string, e.g. `#0000ff` | The color of the text of a [PTFreeText](https://sdk.apryse.com/api/ios/Classes/PTFreeText.html) annotation.  |
| `textSize`    | number, e.g. `16`                           | The font size, in pts, of a [PTFreeText](https://sdk.apryse.com/api/ios/Classes/PTFreeText.html) annotation. |
| `thickness`   | number, e.g. `2`                            | The thickness, in pixels, of an annotation's stroke.                                                         |
| `opacity`     | number between 0 and 1, e.g. `0.5`          | The opacity of an annotation.                                                                                |

| `types` array (case sensitive) |
| ------------------------------ |
| Text                           |
| Link                           |
| FreeText                       |
| Line                           |
| Square                         |
| Circle                         |
| Polygon                        |
| Polyline                       |
| Highlight                      |
| Underline                      |
| Squiggly                       |
| StrikeOut                      |
| Stamp                          |
| Caret                          |
| Ink                            |
| Popup                          |
| FileAttachment                 |
| Sound                          |
| Movie                          |
| Widget                         |
| Screen                         |
| PrinterMark                    |
| TrapNet                        |
| Watermark                      |
| ThreeDimensional               |
| Redact                         |
| Projection                     |
| RichMedia                      |
| Arrow                          |
| Signature                      |
| Cloudy                         |
| Ruler                          |
| Perimeter                      |
| Area                           |
| ImageStamp                     |
| PencilDrawing                  |
| FreehandHighlight              |
| Callout                        |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/ios/annotation/customize-color-picker.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
