How to color different parts of a 3d model with different colors according to the pixel value from the ct scans?

CT density has nothing to do with natural colors that you would see when you take photos of skin or exposed tissues. Even colors probed from frozen cross-section images do not resemble those colors or textures - as discussed in the Retain Image Color in Volume Rendering - #19 by lassoan link that I posted above.

All the colors and textures that you see in anatomical atlases are mostly just artistic creative work. The artist might get some inspiration of colors from real pictures, but colors must be changed to clearly differentiate structures that may look exactly the same in real life for a human eye in with regular lighting, textures may need to be changed/emphasized to help with understanding 3D geometry, the picture has to look aesthetically pleasing, etc. so the final result does look like real life photos at all. So, you will not be able to automatically create artistic illustrations from CT images either.

If you want to create nice illustrations from CTs then you can segment the image to get shapes (meshes) and then use computer graphics software (Blender, etc.) to apply textures, set up nice lighting, transparencies, maybe do rigging and skinning, etc. See for example this topic to get some inspiration.