[Nexus 4 Original Android Development] CrimsonSmear:
You are missing first line and need to add a sleep timer prior to the gamma settings.

This is a functioning init.d script with common/requested color profiles:

#!/system/bin/sh -x
setprop net.hostname "Nexus 4"

echo "70" > /sys/class/timed_output/vibrator/amp
echo "1" > /sys/kernel/fast_charge/force_fast_charge
#echo "Y" > /sys/module/sync/parameters/fsync_enabled
echo "70" > /sys/module/msm_thermal/parameters/temp_threshold
echo "850 870 890 910 980 1020 1065 1115 1135 1155 1175 1200" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table; # CrimsonCurve[B][I](4.2)[/I][/B]: FAST bin chip
#echo "384000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
#echo "384000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
#echo "1512000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq; # max 1728000[B][I](4.2)[/I][/B]/1512000[B][I](4.3)[/I][/B]
#echo "1512000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq; # max 1728000[B][I](4.2)[/I][/B]/1512000[B][I](4.3)[/I][/B]
#echo "400000000" > /sys/class/kgsl/kgsl-3d0/max_gpuclk; # 128000000, 200000000, 325000000[B][I](4.2)[/I][/B]/320000000[B][I](4.3)[/I][/B], 400000000
#echo "0" > /sys/module/lge_touch_core/parameters/doubletap_to_wake; # [B][I](4.3)[/I][/B]

# System LED Control
## none, mmc0, heartbeat, thermal, usb-online, pm8921-dc-online, batterty-charging-or-full, battery-charging, battery-full, battery-charging-blink-full-solid, wireless-online, rfkill0
echo "wireless-online" > /sys/class/leds/blue/trigger
echo "battery-full" > /sys/class/leds/green/trigger
echo "thermal" > /sys/class/leds/red/trigger

# Hotplug Driver Control
#echo "2" > /sys/class/misc/mako_hotplug_control/cores_on_touch
#echo "60" > /sys/class/misc/mako_hotplug_control/first_level
echo "594000" > /sys/class/misc/mako_hotplug_control/suspend_frequency

# Sound Control
echo "-3" > /sys/class/misc/soundcontrol/headset_boost; # -11 to 11[B][I](4.2)[/I][/B]
echo "3" > /sys/class/misc/soundcontrol/volume_boost; # 0 to 20[B][I](4.2)[/I][/B]
#echo "0" > /sys/devices/i2c-0/0-0058/comp_rate; # 0(disabled/1:1), 1(2:1), 2(4:1), 3(8:1)
#echo "1" > /sys/devices/i2c-0/0-0058/out_lim; # 0(enabled), 1(disabled, only if comp_rate 1:1)
#echo "12" > /sys/devices/i2c-0/0-0058/fixed_gain; # 0 to 30 (if comp_rate enabled, also 36 to 63 = -28 dB to -1 dB)
#echo "12" > /sys/devices/i2c-0/0-0058/max_gain; # 0 to 12 (18 dB to 30 dB)[B][I](4.3)[/I][/B]
#echo "5" > /sys/devices/i2c-0/0-0058/atk_time; # 1 to 63 (0.1067 ms per step/0.5 dB)[B][I](4.3)[/I][/B]
#echo "11" > /sys/devices/i2c-0/0-0058/rel_time; # 1 to 63 (137 ms per step/0.5 dB)[B][I](4.3)[/I][/B]
[STRIKE]#echo "0" > #AGC_HOLD_TIME[/STRIKE]; # 0 to 63 (137 ms per step)[B][I](N/A)[/I][/B]
[STRIKE]#echo "26" > #AGC_OUTPUT_LIMITER_LEVEL[/STRIKE]; # 0 to 31 (-6.5 dBV to 9 dBV in 0.5 steps)[B][I](N/A)[/I][/B]
[STRIKE]#echo "1" > #AGC_NOISE_GATE_THRESHOLD[/STRIKE]; # 0(1 mVrms), 1(4 mVrms), 2(10 mVrms), 3(20 mVrms)[B][I](N/A)[/I][/B]
#echo "0" > /sys/class/misc/soundcontrol/mic_gain; # 0 to 10[B][I](4.3)[/I][/B]

# Accuracy Filter Control
#echo "0" > /sys/devices/virtual/input/lge_touch/delta_max
#echo "20" > /sys/devices/virtual/input/lge_touch/direction_count
#echo "0" > /sys/devices/virtual/input/lge_touch/ignore_pressure_gap
#echo "0" > /sys/devices/virtual/input/lge_touch/max_pressure
#echo "200" > /sys/devices/virtual/input/lge_touch/time_to_max_pressure
#echo "40" > /sys/devices/virtual/input/lge_touch/touch_max_count

sleep 5

# Color/Gamma Control

# --- f.Ku Accepted Profiles ---

## Type H - halluci293
#echo "200 195 185" > /sys/devices/platform/kcal_ctrl.0/kcal
#echo "0" > /sys/class/misc/gammacontrol/red_greys
#echo "23" > /sys/class/misc/gammacontrol/red_mids
#echo "119" > /sys/class/misc/gammacontrol/red_blacks
#echo "0" > /sys/class/misc/gammacontrol/red_whites
#echo "0" > /sys/class/misc/gammacontrol/green_greys
#echo "23" > /sys/class/misc/gammacontrol/green_mids
#echo "119" > /sys/class/misc/gammacontrol/green_blacks
#echo "0" > /sys/class/misc/gammacontrol/green_whites
#echo "0" > /sys/class/misc/gammacontrol/blue_greys
#echo "23" > /sys/class/misc/gammacontrol/blue_mids
#echo "119" > /sys/class/misc/gammacontrol/blue_blacks
#echo "0" > /sys/class/misc/gammacontrol/blue_whites
#echo "0" > /sys/class/misc/gammacontrol/contrast
#echo "8" > /sys/class/misc/gammacontrol/brightness
#echo "23" > /sys/class/misc/gammacontrol/saturation

## Type K - Kel Ghu
#echo "185 185 185" > /sys/devices/platform/kcal_ctrl.0/kcal
#echo "0" > /sys/class/misc/gammacontrol/red_greys
#echo "6" > /sys/class/misc/gammacontrol/red_mids
#echo "119" > /sys/class/misc/gammacontrol/red_blacks
#echo "0" > /sys/class/misc/gammacontrol/red_whites
#echo "0" > /sys/class/misc/gammacontrol/green_greys
#echo "6" > /sys/class/misc/gammacontrol/green_mids
#echo "119" > /sys/class/misc/gammacontrol/green_blacks
#echo "0" > /sys/class/misc/gammacontrol/green_whites
#echo "0" > /sys/class/misc/gammacontrol/blue_greys
#echo "6" > /sys/class/misc/gammacontrol/blue_mids
#echo "119" > /sys/class/misc/gammacontrol/blue_blacks
#echo "0" > /sys/class/misc/gammacontrol/blue_whites
#echo "19" > /sys/class/misc/gammacontrol/contrast
#echo "15" > /sys/class/misc/gammacontrol/brightness
#echo "7" > /sys/class/misc/gammacontrol/saturation

# --- Original Profiles ---

## LG Preset
#echo "255 250 245" > /sys/devices/platform/kcal_ctrl.0/kcal
#echo "114" > /sys/class/misc/gammacontrol/red_greys
#echo "21" > /sys/class/misc/gammacontrol/red_mids
#echo "118" > /sys/class/misc/gammacontrol/red_blacks
#echo "48" > /sys/class/misc/gammacontrol/red_whites
#echo "114" > /sys/class/misc/gammacontrol/green_greys
#echo "21" > /sys/class/misc/gammacontrol/green_mids
#echo "118" > /sys/class/misc/gammacontrol/green_blacks
#echo "48" > /sys/class/misc/gammacontrol/green_whites
#echo "114" > /sys/class/misc/gammacontrol/blue_greys
#echo "21" > /sys/class/misc/gammacontrol/blue_mids
#echo "118" > /sys/class/misc/gammacontrol/blue_blacks
#echo "48" > /sys/class/misc/gammacontrol/blue_whites
#echo "0" > /sys/class/misc/gammacontrol/contrast
#echo "0" > /sys/class/misc/gammacontrol/brightness
#echo "80" > /sys/class/misc/gammacontrol/saturation

## Google Preset
#echo "255 255 255" > /sys/devices/platform/kcal_ctrl.0/kcal
#echo "64" > /sys/class/misc/gammacontrol/red_greys
#echo "68" > /sys/class/misc/gammacontrol/red_mids
#echo "118" > /sys/class/misc/gammacontrol/red_blacks
#echo "32" > /sys/class/misc/gammacontrol/red_whites
#echo "64" > /sys/class/misc/gammacontrol/green_greys
#echo "68" > /sys/class/misc/gammacontrol/green_mids
#echo "118" > /sys/class/misc/gammacontrol/green_blacks
#echo "32" > /sys/class/misc/gammacontrol/green_whites
#echo "32" > /sys/class/misc/gammacontrol/blue_greys
#echo "35" > /sys/class/misc/gammacontrol/blue_mids
#echo "116" > /sys/class/misc/gammacontrol/blue_blacks
#echo "51" > /sys/class/misc/gammacontrol/blue_whites
#echo "0" > /sys/class/misc/gammacontrol/contrast; # blue 31
#echo "0" > /sys/class/misc/gammacontrol/brightness; # blue 16
#echo "48" > /sys/class/misc/gammacontrol/saturation; # blue 80

## 2nd Revision BRIGHT - molesarecoming
#echo "245 244 240" > /sys/devices/platform/kcal_ctrl.0/kcal
#echo "57" > /sys/class/misc/gammacontrol/red_greys
#echo "21" > /sys/class/misc/gammacontrol/red_mids
#echo "118" > /sys/class/misc/gammacontrol/red_blacks
#echo "48" > /sys/class/misc/gammacontrol/red_whites
#echo "57" > /sys/class/misc/gammacontrol/green_greys
#echo "21" > /sys/class/misc/gammacontrol/green_mids
#echo "118" > /sys/class/misc/gammacontrol/green_blacks
#echo "48" > /sys/class/misc/gammacontrol/green_whites
#echo "57" > /sys/class/misc/gammacontrol/blue_greys
#echo "21" > /sys/class/misc/gammacontrol/blue_mids
#echo "118" > /sys/class/misc/gammacontrol/blue_blacks
#echo "48" > /sys/class/misc/gammacontrol/blue_whites
#echo "31" > /sys/class/misc/gammacontrol/contrast
#echo "9" > /sys/class/misc/gammacontrol/brightness
#echo "72" > /sys/class/misc/gammacontrol/saturation

## 2nd Revision DARK/CONTRASTY - molesarecoming
#echo "245 244 240" > /sys/devices/platform/kcal_ctrl.0/kcal
#echo "64" > /sys/class/misc/gammacontrol/red_greys
#echo "68" > /sys/class/misc/gammacontrol/red_mids
#echo "118" > /sys/class/misc/gammacontrol/red_blacks
#echo "48" > /sys/class/misc/gammacontrol/red_whites
#echo "64" > /sys/class/misc/gammacontrol/green_greys
#echo "68" > /sys/class/misc/gammacontrol/green_mids
#echo "118" > /sys/class/misc/gammacontrol/green_blacks
#echo "48" > /sys/class/misc/gammacontrol/green_whites
#echo "64" > /sys/class/misc/gammacontrol/blue_greys
#echo "68" > /sys/class/misc/gammacontrol/blue_mids
#echo "118" > /sys/class/misc/gammacontrol/blue_blacks
#echo "48" > /sys/class/misc/gammacontrol/blue_whites
#echo "26" > /sys/class/misc/gammacontrol/contrast
#echo "0" > /sys/class/misc/gammacontrol/brightness
#echo "72" > /sys/class/misc/gammacontrol/saturation

## 3rd Revision/HOLOBLUE - molesarecoming
#echo "249 249 255" > /sys/devices/platform/kcal_ctrl.0/kcal
#echo "56" > /sys/class/misc/gammacontrol/red_greys
#echo "68" > /sys/class/misc/gammacontrol/red_mids
#echo "116" > /sys/class/misc/gammacontrol/red_blacks
#echo "10" > /sys/class/misc/gammacontrol/red_whites
#echo "56" > /sys/class/misc/gammacontrol/green_greys
#echo "68" > /sys/class/misc/gammacontrol/green_mids
#echo "116" > /sys/class/misc/gammacontrol/green_blacks
#echo "10" > /sys/class/misc/gammacontrol/green_whites
#echo "56" > /sys/class/misc/gammacontrol/blue_greys
#echo "68" > /sys/class/misc/gammacontrol/blue_mids
#echo "116" > /sys/class/misc/gammacontrol/blue_blacks
#echo "10" > /sys/class/misc/gammacontrol/blue_whites
#echo "28" > /sys/class/misc/gammacontrol/contrast; # blue 44
#echo "0" > /sys/class/misc/gammacontrol/brightness; # blue 2
#echo "56" > /sys/class/misc/gammacontrol/saturation; # blue 88

## 4th Revision/HALFBREED - molesarecoming
#echo "255 255 255" > /sys/devices/platform/kcal_ctrl.0/kcal
#echo "64" > /sys/class/misc/gammacontrol/red_greys
#echo "68" > /sys/class/misc/gammacontrol/red_mids
#echo "118" > /sys/class/misc/gammacontrol/red_blacks
#echo "32" > /sys/class/misc/gammacontrol/red_whites
#echo "64" > /sys/class/misc/gammacontrol/green_greys
#echo "68" > /sys/class/misc/gammacontrol/green_mids
#echo "118" > /sys/class/misc/gammacontrol/green_blacks
#echo "32" > /sys/class/misc/gammacontrol/green_whites
#echo "64" > /sys/class/misc/gammacontrol/blue_greys
#echo "68" > /sys/class/misc/gammacontrol/blue_mids
#echo "118" > /sys/class/misc/gammacontrol/blue_blacks
#echo "32" > /sys/class/misc/gammacontrol/blue_whites
#echo "25" > /sys/class/misc/gammacontrol/contrast
#echo "4" > /sys/class/misc/gammacontrol/brightness
#echo "66" > /sys/class/misc/gammacontrol/saturation

# --- Faux/Motley kernel conversion---
# [B]kgamma_red:[/B] [I]R_checksum[/I], R_greys, R_mids, R_blacks, 0, contrast, brightness, saturation, R_whites, 2
# [B]kgamma_green:[/B] [I]G_checksum[/I], G_greys, G_mids, G_blacks, 0, contrast, brightness, saturation, G_whites, 2
# [B]kgamma_blue:[/B] [I]B_checksum[/I], B_greys, B_mids, B_blacks, 0, contrast, brightness, saturation, B_whites, 2
# [I](checksum = sum of last 9 digits)[/I]

## Stock Google presets (from kernel source code)
#echo "255 255 255" > /sys/devices/platform/kcal_ctrl.0/kcal
#echo "332 64 68 118 1 0 0 48 32 1" > /sys/devices/platform/mipi_lgit.1537/kgamma_red
#echo "332 64 68 118 1 0 0 48 32 1" > /sys/devices/platform/mipi_lgit.1537/kgamma_green
#echo "364 32 35 116 0 31 16 80 51 3" > /sys/devices/platform/mipi_lgit.1537/kgamma_blue

echo "1" > /sys/devices/platform/kcal_ctrl.0/kcal_ctrl

sleep 25

# Default CPU Governor Adjustments[B][I](4.2)[/I][/B]
if [ -e /sys/devices/system/cpu/cpufreq/interactive ]; then
## Interactive
#echo "702000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
#echo "1026000" > /sys/devices/system/cpu/cpufreq/interactive/input_boost_freq
echo "90" > /sys/devices/system/cpu/cpufreq/interactive/up_threshold
#echo "1" > /sys/devices/system/cpu/cpufreq/interactive/dynamic_scaling; # set "0" to adjust remaining Interactive
##echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
##echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
##echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo
elif [ -e /sys/devices/system/cpu/cpufreq/ondemand ]; then
## Ondemand
#echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
#echo "10000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
#echo "90" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo
elif [ -e /sys/devices/system/cpu/cpufreq/conservative ]; then
## Conservative
#echo "20" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold
#echo "25" > /sys/devices/system/cpu/cpufreq/conservative/freq_step
#echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor
#echo "40000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate
[STRIKE]##echo "40000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate_min[/STRIKE]; # locked value
#echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold
echo
fi

# Default GPU Governor Adjustments
if [ -d /sys/class/kgsl/kgsl-3d0/pwrscale/trustzone ]; then
## Simple
#echo "5500" > /sys/module/msm_kgsl_core/parammeters/simple_ramp_threshold
echo
fi

Uncomment the values/colour scheme you prefer, name it, stick it in system/etc/init.d and give it 755 permissions / rwxr-xr-x.

Increase UI Responsiveness:

- Go to Settings -> Developer Options

- Windows Animation = 0.5x (Leave at 1x if you still want CRT-OFF animation)

- Transition Animation = 0.5x

- Animator Duration Scale = 0.5x

f.Ku Emergency Reset Zip

Log Retrieval

franco.Kernel updater Screen Color Tuning usage & Screen Gamma Settings usage. - halluci293

Screen Type: Help us find them! (Franco's kernel) - NEW METHOD PLEASE RETEST!

Let's calibrate Mako | 18Feb: ALL KERNELS COMPILED AGAINST 4.2.2

Color Calibration for the Nexus 4 - visceralpsyche

Color Calibration Profile v2 - visceralpsyche

AsukaBook Calibration File

Display Adjustment

Display Tester

Arstoien's GamaTester_5.1

Nexus 4 Color Settings [spreadsheet]