[Nexus 5 Original Android Development] rajendra82:
I have thought about a much simpler solution to the color correction problem. I played around with the yorici spreadsheet and also tried to create my own using a proportional adjustment method with three inputs (gain, offset, and gamma) for each color, but no matter how much I played with the input parameters, I could never recreate what I really wanted, which is to rebuild something reasonably similar to the mag01 profile of register values using the input values, which works well on my screen. Then I attacked the problem more directly and came up with a simple and IMO workable solution, part of which I have attached below in spreadsheet form. Here is a summary of how it could be done:

1. The FKU app, or any other app that wants to provide color control reads the 70 relevant register values (23 corresponding to color intensities for red green and blue, and one for the white point). The app then derives and provides the user current intensity values at 5 select levels for the colors (intensities at levels 1-12 are 255 minus register value, while those at levels 13-23 are register value directly) and also the white point. The intensity values can go from 0 to 255, while the white point can go from 0 to 63. The user interface consists of user being allowed to change these 16 values. Since the values are intensity at several levels and are shown in a decreasing order, I think it is intuitive for the user what is expected.

2. When the user changes the value of intensity at any level for the colors, and decides to apply the changes, the app derives a delta for intensity at each level using either the delta between the user input intensity value and current intensity value for the five reference levels for each color that were directly allowed a modification and linear interpolation at the other 18 that were not. The app then back calculates register values by using the intensities at each level. The spreadsheet formulas show how this is done quite easily.

3. White point adjustment (if done) is simple. It is simply the value that user inputs.

4. The app then writes all 70 register values to a text file and also updates the registers.

5. The user has the ability to manually tweak any of the 70 profile values for the registers stored in the text file and reload the profile, which the app can directly use to update all registers, without having to interpolate. There could also be a default text file of the initial register values to reload all 70 values from stock factory profile if the user messes up the process.

In my spreadsheet if you input the input mag01 values at the 5x3 reference intensities while starting from stock levels, you get very close values to what mag01 used at all 70 registers by interpolation. The error is a maximum of 5% and mostly happens at the higher registers for the near black colors, so it should not impact the actual adjustment a whole lot.

If this could be done in FKU, it should allow both white point adjustment, and entire individual color curve coarse adjustment without the need for a cumbersome user interface, but it would also allow people to do or load a finely adjusted color profile like that from mag01, if they want to.