Most videocards are limited to a texture size of 4096x4096.

Texture lookups to convert color are easy to do in a shader. Currently I don't have an example, but I can help you if you have an OpenGL app that can render with shaders.