Seems to me, that you want it to work more like paper folding than cloth. Cloth actually stretches, paper far less so*. This means you might be interested in origami or 3D texturing. Basically this is how UV texturing works.
Image 1: a quick test of folding**. Note that due to the limited palette of a GIF its not unique color. But it is unique in a full 16 bit palette.
Your requirement that every pixel is different can mean many things. For this to hold true, would mean:
- no antialiasation
- and/or interpolation may happen.
Fine no problem for antialiasation but interpolation is already a bit painful. If you are pedantic about this then it means that all we can do is move pixels in a group. This makes all standard approaches problematic. You would need to ensure quite many things. Certainly 3D apps can be tweaked to accomodate this. Especially if your not obsessed by the colors themselves, and permit the program to make new colors within this range just as long as no duplicate exsist.
In any case you would probably get a better answer if you could provide some info on why your restrictions are what they are.
* Note im a mechanical engineer as far as i am concerned, everything stretches. Even high grade steel.
** The start is a bit off because I only had 10 minutes time to spare