The very definition of a fossil includes objects that another material has replaced. These are called casts. Impressions are also fossils, such as the shape of a prehistoric fern leaf embedded in shale rock or the impression of a shell in limestone. Somewhat standard in Western Pennsylvanian fossils from the Carboniferous are shells that still contain the original material from which they were made.
These shells show up as a white color contrasted with the dark limestone locally. This is said to be preserved aragonite (CaCO3) shell material from the original shell. Over 300+ million years from now, it’s pretty remarkable that the shell material persists. Being a carbonite mineral, aragonite is one of three common carbonate minerals. Calcite and Vaterite are the others.