First principles study of the optical contrast in phase change materials.