Directly accessing LUT (read/write)


I want to try a few things with the look up table for colors. However I have no idea what I am doing. So far my understanding is, that the gpu is able to map any single color to an arbitrary other color using a 3D LUT. So in principle a 3D LUT is a 255255255*3 array of bytes (assuming 8 bit color per channel). E.g. image I want to map the rgb color (1, 2, 3) to (6, 5, 4) I would set:

LUT[1][2][3][0] = 6
LUT[1][2][3][1] = 5
LUT[1][2][3][2] = 4

This could be used to arbitrarily remap colors. The use case is mitigation of eye strain by smart mapping.

Is it possible to read the current LUT (supposedly containing some calibration) and writing a modified LUT with some API? I would be happy about any pointers for this topic for further reading, too :)