# image.renderingMode()

[SwiftUI](../..) ⟩ [control](..) ⟩ [Image]() ⟩ <mark style="color:purple;">**`.renderingMode()`**</mark>

{% hint style="info" %}
將<mark style="color:yellow;">圖片</mark>設為：&#x20;

* <mark style="color:blue;">`.template`</mark>：[template-image](template-image "mention")&#x20;
* <mark style="color:blue;">`.original`</mark>：或<mark style="color:yellow;">保持原來的色彩</mark>&#x20;
{% endhint %}

<figure><img src="https://1830103165-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M5-JmwCZMKh_d7RfBaN%2Fuploads%2FUpIC8o2jjNUccPiRvMyU%2Ftemplate-image.jpeg?alt=media&#x26;token=47e87c7d-c251-4f67-8984-3e77577ff19d" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="👥 相關" %}
* <mark style="color:purple;">**`.renderingMode()`**</mark> 可以將<mark style="color:yellow;">圖片</mark>設為 [template-image](template-image "mention")
* [sf-symbols](sf-symbols "mention") 天生就是 [template-image](template-image "mention")，不需設定 <mark style="color:purple;">**`.renderingMode()`**</mark>。
{% endtab %}

{% tab title="📗 參考" %}
* [x] Sarun ⟩ [What is image rendering mode in iOS](https://sarunw.com/posts/what-is-image-rendering-mode-in-ios/)
{% endtab %}

{% tab title="📘 手冊" %}
* [SwiftUI](https://developer.apple.com/documentation/swiftui) ⟩ [Image](https://developer.apple.com/documentation/swiftui/image) ⟩ [.renderingMode(\_:)](https://developer.apple.com/documentation/swiftui/image/renderingmode\(_:\))
{% endtab %}
{% endtabs %}
