> For the complete documentation index, see [llms.txt](https://xojo.gitbook.io/add-ons/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xojo.gitbook.io/add-ons/cstruecolors/documentation/template-images.md).

# 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 %}
