6

I don't know if there is metadata accessible for javascript in a web app, to tell which color an iPhone has. Basically what I would like to do is to detect the color of the iPhone and then use a stylesheet related to the color.

enter image description here

EDIT Forgot the question.

is there a way to detect the color of an iDevice?

Corfitz.
  • 1,864
  • 3
  • 31
  • 53

2 Answers2

4

Model numbers are the way to do, for example:

MD381 - Black iPhone 4S
MC920 - White iPhone 4S

BenM
  • 52,573
  • 26
  • 113
  • 168
  • Which command in javascript should I use to get these data? – Corfitz. Mar 05 '13 at 16:01
  • You'll need to use PhoneGap or something similar > http://docs.phonegap.com/en/2.5.0/cordova_device_device.model.md.html#device.model – BenM Mar 05 '13 at 16:02
  • I see.. no way around.. :) I have to make a native application to get access to such information.. – Corfitz. Mar 05 '13 at 16:40
1

The accepted answer for this similar question about iOS (as of early 2012) says no, you can't detect the color of an iPhone or iPod Touch. There's some speculation about identifying the device color through its serial number, but it doesn't look possible to extract the serial number through Javascript in a normal web application.

Community
  • 1
  • 1
Mark Rushakoff
  • 249,864
  • 45
  • 407
  • 398