iTunes can detect if my iPhone is black or white, so how can I do this in code?
I'm thinking it would be a UIDevice thing but I'm not too sure.
Use the eyedropper tool to pick an exact color from an image on the screen. It can be useful if you want to match a color on the current document or one from another file. It's also handy if you see a color you like and want to save it for later.
Color Name is an indispensable assistant to help you choose paints, wallpaper, and decorative elements. Besides, it is a handy instrument for everyday use. Do you want to know what Fuchsia Color looks like? Or emerald-green?
iPhone uses sRGB color space.
An accent color, or tint color, is a broad theme color that applies to views and controls in your app. Use an accent color to quickly create a unifying color scheme for your app. You can set an accent for your app by specifying an accent color in your asset catalog.
You can obtain color from model part number, for example:
MD381 - black iPhone 4S
MC920 - white iPhone 4S
...
To obtain model number use uidevice-extension
Addition: Alternative solution. Link your project with libLockdown.dylib.
extern id lockdown_connect();
extern id lockdown_copy_value(id, id, id);
extern void lockdown_disconnect();
extern NSString *kLockdownDeviceColorKey;
NSString* CopyDeviceColor() {
id connection = lockdown_connect();
NSString *color = lockdown_copy_value(connection, nil, kLockdownDeviceColorKey);
NSLog(@"color = %@", color);
lockdown_disconnect(connection);
return color;
}
iTunes detects the color of the device from the serial number I believe.
There is no way to determine the color of the device or developers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With