The color of an Apple device can be found by parsing its serial number. You can use I/O Kit to get the serial number. Please refer to:
Differentiate between black and white iPhones?
Using IOKit to return Mac's Serial number returns 4 extra characters
But you need to be cautious because it is possible for Apple to reject your app (I haven't tried to use libIOKit.a in my app yet):
If I access the iPhone serial number inside an app, is it allowed in the App Store?