Test Kirigami.ImageColors can extract colors from items
Also add a check for the platform theme to not always create it when the attached object is not available to make sure the test don't crash.
Also add a check for the platform theme to not always create it when the attached object is not available to make sure the test don't crash.