How to Adjust the Color Temperature of iPhone Screen Using Gamma Thingy

Although Apple launched the Night Shift feature in iOS lets user switch the color temperature of the screen to a warmer color, but it is too yellow. However, besides this we can not freely adjust the screen color temperature on un-jailbroken device.

F.lux for iOS was a great little app available in the App Store that changes the iPhone screen brightness depending on the time of day. But it is currently blocked due to Apple’s policy, we can only install F.lux on a jailbroken device.
So now if you want to adjust the Color Temperature and your iPhone without a jailbreak, then you can install an alternative “Gamma Thingy” on your device through Xcode.

Gamma Thingy is not available in the App Store, but it is on GitHub and subsequently you can load it onto your iOS device with a free developer account as long as you have a little time (it’s not particularly complicated, but is a little time consuming, here’s how). Once you do, you’ll be able to adjust the color of your screen easily so it’s not as blinding. It’s not nearly as complex as F.lux, but it gets the job done.

gamma Thingy

You should prepare:

A Mac computer

A free developer account

To create a developer account, visit Apple’s developer website at http://developer.apple.com. Once there, click the Member Center option in the upper right-hand corner, and click Create Apple ID. From there, it’s just a matter of filling out the requested information to create your account. Once you have created your account, you can move on to the next step. If you already have an Apple ID, log in with that ID to turn the account into a developer account.

Xcode 7

You can download the Xcode 7 on the Mac App Store.

Gamma Thingy

Download Gamma Thingy from its GitHub page:

https://github.com/thomasfinch/GammaThingy

Once you are ready, you can follow these steps below to start installing Gamma Thingy to adjust the color temperature of your iPhone.

How to:

Check Out the code in Xcode

Step#1 Inside of Xcode 7, click Source Control in the menu bar and click Check Out.

1

Step#2 In the repository location box, paste the HTTPS clone URL: https://github.com/thomasfinch/GammaThingy.git and click next.

2

Step#3 Click the Download button that appears to download the source code to your Mac and import into Xcode 7.

3
Select the folder that the item you want to saved in

Once the code is fully loaded, you will see the name of the project followed by ‘Ready‘.

Modify the file

Now you need to modify the project ‘Gamma Controller.m‘ code (because GammaThingy originally used to adjust the screen color temperature to warmer, now we need to modify the algorithm to adjust the color temperature to cool) Copy the following code to the (void)setGammaWithOrangeness, as shown below:

percentOrange = percentOrange/7.5;
if (percentOrange > 1)
percentOrange = 1;
else if (percentOrange < 0)
percentOrange = 0;

float blue = 1.0;
float red = 1 - percentOrange;
float green = (red + blue)/2.0;

if (percentOrange == 0) {
red = blue = green = 0.99;
}

[self setGammaWithRed:red green:green blue:blue];

paste code

Connect your iOS device via USB. In the drop down device selection menu, select your iPhone

select iPhone

Then click on the Play button on the left, this time xcode will get an error prompts “failed to code sign“, do not worry, this is normal, you just click “fix issue“, and then login to your developer account.

Once you login the developer account, click the Play button again, then continue error, suggesting “An App ID with Identifier ... is not available. Please enter a different string.“, Do not worry, go to the place shown below to modify “Bundle Identifier” into “com.xxx.GammaTest” (xxx replaced with any name you want).

Bundle Identifie

Click the Play button once more. The compile should complete, and you’ll see the app that you compiled appear on your iOS device’s Home screen.

Now you’ll need to enable access to the app by trusting the developer on your iOS device. This can be done by going to Settings → General → Profile and tapping on the Developer app and granting access.

Then launch the Gamma Thingy app on your Home screen, and iOS should allow you to use it to adjust the Color Temperature.

GammaThingy

GammaThingy2

You May Also Like

More From Author

+ There are no comments

Add yours