# Template Images

macOS can use an image as a template image, which means it automatically adapts to the control it is part of.

For this to work, an image has to be pure black/grayscale and transparent. On a dark control background, the image is automatically drawn white while on a light background it is drawn black.

{% hint style="warning" %}
This does not work inside of a paint event automatically.\
Instead, use the [Template](/add-ons/cstruecolors/documentation/appkitaddition.md#template-extends-s-as-pushbutton-scaling-as-nsimagescaling-nsimagescaling-proportionallyupordown-position-as-nscellimageposition-nscellimageposition-imageleft-assigns-pic-as-picture) methods of the AppKitAddition to insert a picture as a template into the supported controls.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://xojo.gitbook.io/add-ons/cstruecolors/documentation/template-images.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
