You need to put a file "myApp.sudoers" into /etc/sudoers.d/ with a content like and call in postinst 'update-sudoers'. Then you may call the script with sudo without requiring a password.
[Desktop Entry] Type=Application Name=My Theme Exec=sudo /opt/mytheme/changer/script.sh Icon=/opt/mytheme/icon/icon.png X-Window-Icon= X-HildonDesk-ShowInToolbar=true X-Osso-Type=application/x-executable