Gamma is not sufficient anyway. A general strategy should support color wheel rotation. I think the earlier color management article hinted that the strategy is approximately as follows:
- make a 3D texture per display that provides mapping between the sRGB color space and the monitor's distorted RGB space.
- as the last step of composition, read the sRGB color triplets from the framebuffer, and replace them through interpolated 3D lookup through the above texture.
The suggested size for this texture was 16x16x16 texels, so 4096 values and 4 bytes per value giving 16k size for the look-up table in its most simple form. However, there are banding artifacts that appear when colors are quantized this way, so to avoid them it may be necessary to dither the result. Dithering the image properly needs more than 8 bits of precision per component to do.