This particular problem, which is not to be confused with similar-looking problems with .im8 images in later versions, was a known issue with Motif:
1255448: cde on Solaris x86 has yellow tinting problem with TrueColor default visual It can be fixed by installing the appropriate Motif patch for the particular Solaris release (e.g. 2.5 → 103947, 2.5.1 → 104195).