A color-magnitude study of the globular cluster M15