Firstly, I believe this is not possible in iOS 16. This API introduced is only available for iOS 17 or later.
Secondly, the custom color can be set the Info.plist. Do the following:
<dict>
.....
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>NSAppIconActionTintColorName</key>
<string>ShortcutsForeground</string>
<key>NSAppIconComplementingColorNames</key>
<array>
<string>ShortcutsBackground1</string>
<string>ShortcutsBackground2</string>
</array>
</dict>
</dict>
</dict>
Reference: https://developer.apple.com/forums/thread/732747
Topic:
App & System Services
SubTopic:
General
Tags: